-
Notifications
You must be signed in to change notification settings - Fork 7
Feature: Add the generate_pkgid_to_licenses() function for retrieving the licenses for artifacts
#118
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
base: main
Are you sure you want to change the base?
Feature: Add the generate_pkgid_to_licenses() function for retrieving the licenses for artifacts
#118
Conversation
000b7b3 to
f5dd073
Compare
…ng the licenses for artifacts
f5dd073 to
7e9157c
Compare
|
@ericphanson @giordano: Would you be able to review this? |
Co-authored-by: Mosè Giordano <[email protected]>
Co-authored-by: Mosè Giordano <[email protected]>
Co-authored-by: Mosè Giordano <[email protected]>
| artifacts_toml_files = String[] | ||
| for (root, dirs, files) in walkdir(local_dir) | ||
| for name in files | ||
| if name in Artifacts.artifact_names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, this looks a bit weird to me, does Artifacts have a global registry of all names or something? is this the right way to match them? (can there be collisions?)
|
I think it would make sense for this feature to be integrated more into the existing code. For example we can add PackageAnalyzer.jl/src/PackageAnalyzer.jl Lines 128 to 129 in 9ca90f7
this is not breaking (see note https://juliaecosystem.github.io/PackageAnalyzer.jl/dev/#The-PackageV1-struct). Then we can automatically populate it when analyzing that specific package. Then we don't need to call The other thing is I'm not sure we should use PkgId. That's a Base internal type and could expose us to breaking changes. I think it's probably enough to expose artifact licenses in PackageV1; the caller can map to PkgIds if they want. |
Motivation
Currently, PackageAnalyzer.jl offers the ability to process a
Manifest.tomland extract the licenses for all of the Julia packages.However, many Julia packages use binary artifacts, and the licenses for those binary artifacts may often differ from the license of the Julia wrapper.
This PR adds the ability to extract the licenses for the binary artifacts.
Example usage