Skip to content

Use correct syntax for empty YAML sequence #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 26, 2023
Merged

Use correct syntax for empty YAML sequence #123

merged 3 commits into from
Mar 26, 2023

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented Mar 26, 2023

Unlike the other inputs (platforms, sketch-paths) that use a "sequence" (AKA array, list) type YAML document, because a sketch may have no library dependencies it is valid and common to pass an empty sequence via the libraries input.

Due to the need to maintain backwards compatibility with the original short-sighted design of the action API, which didn't consider the action being used with any project type other than libraries, it is necessary for the user to do this in their workflow rather than simply omitting the libraries input.

Previously the documentation and tests used "-" for this purpose. That is supported, but is not an empty sequence, but rather a sequence consisting of a single null element. The only way to specify an empty sequence in YAML is [].

per1234 added 3 commits March 25, 2023 18:52
The project uses a standardized target line length of 120 for YAML files. In some cases it is not feasible to meet that
target, but other lines were unnecessarily long.
Unlike the other inputs (`platforms`, `sketch-paths`) that take a "sequence" (AKA array, list) type YAML document as
input, because a sketch may have no library dependencies it is valid and common to pass an empty sequence via the
`libraries` input.

Due to the need to maintain backwards compatibility with the original short-sighted design of the action API, which
didn't consider the action being used with any project type other than libraries, it is necessary for the user to do
this in their workflow rather than simply omitting the `libraries` input.

Previously the documentation and tests used "-" for this purpose. That is supported, but is not an empty sequence, but
rather a sequence consisting of a single null element. The only way to specify an empty sequence in YAML is `[]`.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: documentation Related to documentation for the project labels Mar 26, 2023
@per1234 per1234 self-assigned this Mar 26, 2023
@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (c9dd641) 99.81% compared to head (1c8eb83) 99.81%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #123   +/-   ##
=======================================
  Coverage   99.81%   99.81%           
=======================================
  Files           2        2           
  Lines        1610     1610           
=======================================
  Hits         1607     1607           
  Misses          3        3           
Impacted Files Coverage Δ
compilesketches/tests/test_compilesketches.py 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@per1234 per1234 merged commit b3ab95f into arduino:main Mar 26, 2023
@per1234 per1234 deleted the empty-sequence-syntax branch March 26, 2023 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants