Skip to content
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

Accomodate updated Scancode attribute names #1237

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

rnjudge
Copy link
Contributor

@rnjudge rnjudge commented Jul 11, 2023

Scancode v31.0.0 includes changes[1] to JSON output attribute names which was causing processing KeyErrors when Tern would run with Scancode. Scancode v32.0.0 also includes changes[2] to license_detection output which was similarly causing parsing KeyErrors when Tern ran with Scancode. This commit adds code that can accomodate the new attribute property names in the newer versions of Scancode, as well as the older value names (in case we have users still using older Scancode versions). At some point in the future, it probably makes sense to re-visit some of these changes and see if we want to continue to support older versions of scancode.

This commit also has small changes that updated the README instructions for how to install newer Scancode versions on M1/ARM hardware and also fixes a small bug that was causing purl generation to fail when Scancode doesn't detect a package format.

[1]https://github.com/nexB/scancode-toolkit/blob/e3099637b195daca54942df9f695f58990097896/CHANGELOG.rst#v3100---2022-08-17

[2]https://github.com/nexB/scancode-toolkit/blob/e3099637b195daca54942df9f695f58990097896/CHANGELOG.rst#license-detection

Resolves #1202

Scancode v31.0.0 includes changes[1] to JSON output attribute
names which was causing processing KeyErrors when Tern would run with
Scancode. Scancode v32.0.0 also includes changes[2] to license_detection
output which was similarly causing parsing KeyErrors when Tern ran
with Scancode. This commit adds code that can accomodate the new
attribute property names in the newer versions of Scancode, as well as
the older value names (in case we have users still using older Scancode
versions). At some point in the future, it probably makes sense to
re-visit some of these changes and see if we want to continue to support
older versions of scancode.

This commit also has small changes that updated the README instructions
for how to install newer Scancode versions on M1/ARM hardware and also
fixes a small bug that was causing purl generation to fail when Scancode
doesn't detect a package format.

[1]https://github.com/nexB/scancode-toolkit/blob/e3099637b195daca54942df9f695f58990097896/CHANGELOG.rst#v3100---2022-08-17

[2]https://github.com/nexB/scancode-toolkit/blob/e3099637b195daca54942df9f695f58990097896/CHANGELOG.rst#license-detection

Resolves tern-tools#1202

Signed-off-by: Rose Judge <rjudge@vmware.com>
@rnjudge rnjudge merged commit d3dd148 into tern-tools:main Jul 13, 2023
5 checks passed
armintaenzertng added a commit to armintaenzertng/tern that referenced this pull request Jul 17, 2023
this ensures compatibility with scancode

Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
armintaenzertng added a commit to armintaenzertng/tern that referenced this pull request Jul 18, 2023
this ensures compatibility with scancode

Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error if Tern calls Scancode-Toolkit
1 participant