Comments (6)
Thanks for filing this! Can you provide a bit more details for how to reproduce this (e.g. args used, expected result, etc)?
My default stance is to roll this change back if it's causing problems, but I need some help reproducing the issue. 🙏
from go-licenses.
Howdy! sorry long delay, holidays...
Here is a little script you can run to see what I am seeing:
pushd $(mktemp -d)
go install github.com/google/go-licenses@master
go mod init example.com/demo
curl https://www.apache.org/licenses/LICENSE-2.0.txt > LICENSE
cat <<EOF > main.go
package main
import (
. "github.com/hashicorp/golang-lru"
)
func main() {
New(128)
}
EOF
go mod tidy
go mod vendor
git init
git add .
git commit -m "after vendor"
go-licenses save ./... --save_path="third_party/VENDOR-LICENSE" --force
git add .
git commit -m "after first licesnse save"
go mod vendor
go-licenses save ./... --save_path="third_party/VENDOR-LICENSE" --force
from go-licenses.
The error I get locally:
Error: open /var/folders/65/kbdvw9617tx1x8qh8f6md2xw0000gn/T/tmp.yWaWgyJ1/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/LICENSE: no such file or directory
Usage:
licenses save <package> [flags]
Flags:
--force Delete the destination directory if it already exists.
-h, --help help for save
--save_path string Directory into which files should be saved that are required by license terms
Global Flags:
--alsologtostderr log to standard error as well as files
--confidence_threshold float Minimum confidence required in order to positively identify a license. (default 0.9)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
F1229 12:15:02.542070 57909 main.go:43] open /var/folders/65/kbdvw9617tx1x8qh8f6md2xw0000gn/T/tmp.yWaWgyJ1/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/LICENSE: no such file or directory
¯\(°_o)/¯ tree
.
├── LICENSE
├── go.mod
├── go.sum
├── main.go
├── third_party
└── vendor
├── github.com
│ └── hashicorp
│ └── golang-lru
│ ├── 2q.go
│ ├── LICENSE
│ ├── README.md
│ ├── arc.go
│ ├── doc.go
│ ├── lru.go
│ └── simplelru
│ ├── lru.go
│ └── lru_interface.go
└── modules.txt
6 directories, 13 files
from go-licenses.
I think this error is the LICENSE file inside third_party has been indexed, but then it was deleted and then attempted to be accessed.
from go-licenses.
I think part of the problem is that the third_party
dir is getting treated as packages to be licensified:
❯ go list ./...
example.com/demo
example.com/demo/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru
example.com/demo/third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/simplelru
from go-licenses.
Approved #99 to roll back this change. Sorry about the trouble!
from go-licenses.
Related Issues (20)
- Libraries function returns non-licensed vendored package as the package with LICENSE from root project HOT 5
- Export local license paths HOT 2
- Improper `isStdlib()` path check using `strings.HasPrefix()` HOT 2
- Wrong GOROOT is used when go-licenses builds and runs on different environments HOT 3
- 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
- LICENSE detection is OS specific HOT 5
- 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 4
- 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
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.