-
Notifications
You must be signed in to change notification settings - Fork 125
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
LICENSE detection is OS specific #187
Comments
Repro case: git clone https://github.com/knative/func
cd func
go install github.com/google/[email protected]
GOOS=darwin go-licenses save ./... --save_path=third_party/VENDOR-LICENSE --force
git status
# shows two deleted files and one untracked directory
GOOS=linux go-licenses save ./... --save_path=third_party/VENDOR-LICENSE --force
git status
# shows no diffs In particular, this may affect both Ideally, it would be possible to override the use of |
Good catch! So far I think this is intended behavior. To know complete dependency under all OS, arch and even build tags require running the same license detection process in each combination. (Theoretically, we can dedup license text detection and just iterate through deps for each combination) I would prefer leaving the choice to users. Welcome adding documentation for this. |
This is a bug. Since the go.mod declares it's go version as go1.17 all the indirect dependencies are present. This list contains all the dependencies for all OS versions - but the license saving functionality doesn't include some of them. |
Even vendoring (ie. |
You have a point! Welcome contributions! |
We noticed that
go-licenses
will produce different results depending on the host operating system.ie.
https://github.com/opencontainers/selinux
on linux will pull ingolang.org/x/sys
but on Mac it does not.The text was updated successfully, but these errors were encountered: