Skip to content

Update format of dependency license metadata #267

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 1 commit into from
Mar 2, 2025

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Mar 2, 2025

The Licensed tool is used to check for incompatible licenses in the project dependencies. The tool relies on a cache of metadata stored in the repository.

An older version of Licensed was in use at the time the cache was established. There are some minor differences in the format of the metadata generated by the version of Licensed currently in use.

Trailing Whitespace

Previous versions of this tool added a trailing space on the summary key. Although trailing whitespace in human produced content is not permitted, machine generated content is used as-is, and so these trailing spaces were left in the metadata files.

It seems that the defect in the "Licensed" tool that caused the trailing space was fixed in a recent version because it is now absent in the metadata files produced by the tool.

YAML Document End Markers

The version of the tool now in use adds YAML document end markers to some metadata files, which were not present in the files generated by the tool at the time the cache was established.

I don't know why it adds these markers to only some of the metadata files, but they are valid (though optional so the files without are also correct) and machine generated content is used as-is.


Even though there is no technical significance to the format differences, they are disruptive in that they result in irrelevant diffs in specific metadata files when they are regenerated after a dependency bump. Rather than dealing with these diffs over time, it will be best to instead update the metadata to the new format comprehensively.

The "Licensed" tool is used to check for incompatible licenses in the project dependencies. The tool relies on a cache
of metadata stored in the repository.

An older version of "Licensed" was in use at the time the cache was established. There are some minor differences in the
format of the metadata generated by the version of "Licensed" currently in use:

Trailing Whitespace
-------------------

Previous versions of this tool added a trailing
space on the `summary` key. Although trailing whitespace in human produced content is not permitted, machine generated
content is used as-is, and so these trailing spaces were left in the metadata files.

It seems that the defect in the "Licensed" tool that caused the trailing space was fixed in a recent version because it
is now absent in the metadata files produced by the tool.

YAML Document End Markers
-------------------------

The version of the tool now in use adds YAML
document end markers to some metadata files, which were not present in the files generated by the tool at the time the
cache was established.

I don't know why it adds these markers to only some of the metadata files, but they are valid (though optional so the
files without are also correct) and machine generated content is used as-is.

---

Even though there is no technical significance to the format differences, they are disruptive in that they result in
irrelevant diffs in specific metadata files when they are regenerated after a dependency bump. Rather than dealing with
these diffs over time, it will be best to instead update the metadata to the new format comprehensively.
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Mar 2, 2025
@per1234 per1234 self-assigned this Mar 2, 2025
@per1234 per1234 merged commit d98fb50 into arduino:main Mar 2, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant