Comments (5)
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 go-licenses
ability to detect unwanted licenses which are only present for certain architectures.
Ideally, it would be possible to override the use of GOOS
through a command-line flag, and be able to supply a list of operating systems (or OS + Arch combinations) which should be combined.
from go-licenses.
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.
from go-licenses.
So far I think this is intended behavior.
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.
from go-licenses.
Even vendoring (ie. go mod vendor
) includes the license - https://github.com/knative/func/tree/main/vendor/golang.org/x/sys
from go-licenses.
You have a point! Welcome contributions!
The main challenge is that go licenses is implemented like go build by using an official go dep traversal library, so you can specify GOOS and build tags etc, but it only builds for this version.
It's worth looking at whether it has options to allow traversing over all OS
from go-licenses.
Related Issues (20)
- Improper `isStdlib()` path check using `strings.HasPrefix()` HOT 2
- Wrong GOROOT is used when go-licenses builds and runs on different environments HOT 6
- Enable module version logging in custom reports
- go-licenses with go vendoring HOT 2
- go-licenses command is not recognized HOT 1
- How to check all licenses in a project? HOT 2
- `LICENSE` file in repo root is ignored HOT 4
- go-licenses doesn't work when installed with versioned go HOT 3
- insufficient confidence threshold when identifying a BSD 2-Clause like license HOT 3
- Upgrade to google/licenseclassifier v2 HOT 2
- Prepare for v2 release HOT 5
- Help needed resolving `github.com/otiai10/copy` diamond dependency problem HOT 5
- Flags stdilb as "does not have module info" when on `go 1.21.X` HOT 6
- Ignore `W0104 contains non-Go code` warnings in errors
- Migrate to newer go-git HOT 1
- Reporting warnings for external packages on Windows
- no way to legally construct a source.Client
- How to display verbose logging?
- align license detection with golang.org/x/pkgsite/internal/licenses HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-licenses.