-
Notifications
You must be signed in to change notification settings - Fork 79
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
Embed the license data into the library #38
Conversation
Thus we no longer need the modcache present for the library to work properly
664fc81
to
fa0b7c6
Compare
I tested this out with my fork of |
Once this merges |
These commits appear to be for the old v1 branch. On v2, I believe we're intentionally not embedding license data. The description isn't clear, this mostly appears to factor out an interface for monkeypatching. |
Interesting didn't realize there's a v2 subfolder - go-licenses seems to use v1 atm |
I think there's still value in shifting v1 away from requiring the mod cache to be present |
@rspier The intent of the PR is to prevent the license lookup code from reaching into the go mod cache via The alternative is to use go1.16 embed directives to embed the licenses into the resulting binary that's consuming v1 lib. You can repro the old behaviour very easily
This issue actually fixes: #27
I'm assuming you're referring to?
I left this in place as to not break compatability/API surface |
@wcn3 any thoughts on this change? |
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.
Upgrading the minimum version and using the embedding feature is a big win.
Note that the v2 API is not baking the archive into the classifier, letting the user use something like this or any other approach to packaging the licenses. I'll adapt this code as a sample contribution to show one way of initializing the v2 classifier.
Apologies for the delays here. My Github notifications were going to an email that got blackholed. Thank you for making this improvement!
Thus we no longer need the modcache present for the library to work properly