What is the URL of the page with the issue?
https://pkg.go.dev/gitlab.com/tozd/go/fun
What is your user agent?
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Screenshot
No response
What did you do?
I am trying to publish a new version of my package. So I run:
GOPROXY=proxy.golang.org go list -m "gitlab.com/tozd/go/fun@v0.2.0
What did you see happen?
That the version is published and that I see a new version at https://pkg.go.dev/gitlab.com/tozd/go/fun.
What did you expect to see?
go: gitlab.com/tozd/go/fun@v0.2.0: reading https://proxy.golang.org/gitlab.com/tozd/go/fun/@v/v0.2.0.info: 404 Not Found
server response:
not found: create zip: testdata/expected-llama3:8b/1.txt: malformed file path "testdata/expected-llama3:8b/1.txt": invalid char ':'
testdata/expected-llama3:8b/10.txt: malformed file path "testdata/expected-llama3:8b/10.txt": invalid char ':'
testdata/expected-llama3:8b/11.txt: malformed file path "testdata/expected-llama3:8b/11.txt": invalid char ':'
testdata/expected-llama3:8b/12.txt: malformed file path "testdata/expected-llama3:8b/12.txt": invalid char ':'
testdata/expected-llama3:8b/13.txt: malformed file path "testdata/expected-llama3:8b/13.txt": invalid char ':'
[Truncated: too long.]
The reason is that in testdata
directory I have a sub-directory with :
in it. It seems this breaks the publishing process?
I would expect that testdata
directory is ignored by Go.
Comment From: seankhliao
colon is a reserved character for NTFS, tesdata is included in modules.
Comment From: mitar
What is testdata included in modules? That can lead to huge modules. I was under impression that testdata is ignored by Go. It says in go help test
:
The go tool will ignore a directory named "testdata", making it available
to hold ancillary data needed by the tests.
So it seems go tool is not ignoring it. I think that should be at least documented if not fixed (by ignoring it for real).
Comment From: ianlancetaylor
go test
ignores testdata
, as do commands that look for packages in the hierarchy of directories. But the files in testdata are expected to be used by tests, so they are part of a module.