-
Notifications
You must be signed in to change notification settings - Fork 400
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
Add license information to SPDX SBOMs #766
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #766 +/- ##
=======================================
Coverage 52.42% 52.42%
=======================================
Files 43 43
Lines 3325 3325
=======================================
Hits 1743 1743
Misses 1353 1353
Partials 229 229 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
This feels not good
I think we should include detected license information, and I have yet to find a better way to do it than this. Reopening to continue the discussion. |
How much memory does it consume to use this? |
Good question. The whole csv.gz is I tried https://pkg.go.dev/github.com/dghubble/trie#RuneTrie to cut down on that, but it actually used more (or I counted wrong). Using https://github.com/imjasonh/golicenses/compare/trie: with map:
with trie:
|
This Pull Request is stale because it has been open for 90 days with |
Hey, I see that we decided not to go this way. Is there still appetite for doing this (possibly in a different way)? |
This relies on a new package, https://github.com/imjasonh/golicenses (name TBD) that weekly scrapes the deps.dev public dataset to produce a gzipped CSV of Go package names -> their license(s),
//go:embed
s it, and makes it available viagolicenses.Get(p)
.deps.dev itself periodically scrapes GitHub etc to detect licenses using whatever method it uses to do that, it doesn't matter.
The dependency adds ~4MB to the size of the binary (32MB -> 36MB), and
golicenses.Get
takes ~200ms the first time it's called, then ~100ns each subsequent call.Before this change:
After this change: