-
Notifications
You must be signed in to change notification settings - Fork 80
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
bundle dependency license info #1342
Comments
wrt doing this package-manager-independently, in an ideal world this can be broken down into several separable concerns:
|
When digging into this I discovered that, on the Rust side of things:
E.g., for dist itself, [
{
"name": "addr2line",
"version": "0.24.2",
"id": "registry+https://github.com/rust-lang/crates.io-index#[email protected]",
"license": "Apache-2.0 OR MIT"
},
{
"name": "adler2",
"version": "2.0.0",
"id": "registry+https://github.com/rust-lang/crates.io-index#[email protected]",
"license": "0BSD OR MIT OR Apache-2.0"
},
{
"name": "aes",
"version": "0.8.4",
"id": "registry+https://github.com/rust-lang/crates.io-index#[email protected]",
"license": "MIT OR Apache-2.0"
},
...
] |
I guess an important question is: do we just want to know what licenses are used, or do we also want the license text? In Rust, getting the license name for dependencies using a standard license (setting In JavaScript, In Python, In some languages, like C or C++, I'm not aware of any proper standard, so there may need to be a fallback in dist's metadata. |
I think to start on this feature simply collecting the SPDX identifier works and being able to call out simply the presence of a "custom" license works. Most people using a feature like this are trying to have data to see if the tool contains any "blocklisted/sus" licenses (usually GPL+other). What're your thoughts? |
https://github.com/sstadick/cargo-bundle-licenses
tl;dr generate a file that lists all the licenses of deps.
there are so many third party tools that do this that ideally we can leverage the best in class of them to get full coverage for all project types, but it's possible it's also "easy enough" to reimplement given that we are already excellent at finding and reading project manifest files and that using that graph as input to third party tools might be harder than just reimplementing.
The text was updated successfully, but these errors were encountered: