Open advancedwebdeveloper opened 4 years ago
None at all, I don't even use go 🤔
Maybe you meant to tag someone else? 😅
CC @thanm @cherrymui
Do you have any replace
directives in your go.mod
file?
CC @thanm @cherrymui
Do you have any
replace
directives in yourgo.mod
file? @ianlancetaylor , which file are you referring here?
https://github.com/streamsets/datacollector-edge project does not contain any go.mod file.
I took a look at this -- I can reproduce, but I don't have any insight into what's going wrong. I don't see any replace directives at least as far as I can tell.
I don't think this is related to modules. This error would be reported in GOPATH mode if a repository root path resolves to a directory in $GOPATH/src
but that directory doesn't actually contain a repository subdirectory (like .git
).
Does the directory $GOPATH/src/golang.org/x/net/.git
exist? What about $GOPATH/src/golang.org/x/net/http/httpguts/.git
?
Does the directory $GOPATH/src/golang.org/x/net/.git exist?
Yes, $GOPATH/src/golang.org/x/net/.git exists.
What about $GOPATH/src/golang.org/x/net/http/httpguts/.git?
No, that does not exist.
Those three packages are vendored into the standard library: https://github.com/golang/go/blob/86dbeefe1f2770daad3c8d8b46a8b7f21b2c69e1/src/vendor/modules.txt#L14-L17
So probably this has something to do with standard-library vendoring in GOPATH
mode, but I'm not sure what.
Yeah, that go env
output indicates GOROOT="/usr/local"
, so the path /usr/local/src/golang.org/x/net/http/httpguts
would be in GOROOT/src
, but it's presumably not in GOROOT/src
because the correct path there (in Go 1.15rc2) would be /usr/local/src/vendor/golang.org/x/net/http/httpguts
.
@bcmills , so what should be patched?
@advancedwebdeveloper, that depends on what the root cause turns out to be. 😅
Could you run ls -d /usr/local/src/golang.org
and ls -d /usr/local/src/vendor/golang.org
and post the results?
I don't think this is related to modules. This error would be reported in GOPATH mode if a repository root path resolves to a directory in
$GOPATH/src
but that directory doesn't actually contain a repository subdirectory (like.git
).Does the directory
$GOPATH/src/golang.org/x/net/.git
exist?
@jayconrod , $GOPATH is not defined (for some reason) - and that a "by default" state, since I have installed compiled "release" build of gollvm. Better ask @thanm and @cherrymui , what is the problem with $GOPATH, during the installation process.
But a de-facto directory does exist:
~$ file $GOPATH/src/golang.org/x/net/.git /src/golang.org/x/net/.git: cannot open `/src/golang.org/x/net/.git' (No such file or directory) ~$ file go/src/golang.org/x/net/.git go/src/golang.org/x/net/.git: directory ~$ file go/src/golang.org/x/net/.git/ go/src/golang.org/x/net/.git/: directory ~$ ls go/src/golang.org/x/net/.git/ FETCH_HEAD HEAD ORIG_HEAD branches config description hooks index info logs objects packed-refs refs $ cat go/src/golang.org/x/net/.git/HEAD ref: refs/heads/master
What about
$GOPATH/src/golang.org/x/net/http/httpguts/.git
?
Well, in case of this file - neither de-facto nor relative path/fiel exists:
~$ file $GOPATH/src/golang.org/x/net/http/httpguts/.git /src/golang.org/x/net/http/httpguts/.git: cannot open
/src/golang.org/x/net/http/httpguts/.git' (No such file or directory) ~$ file go/src/golang.org/x/net/http/httpguts/.git go/src/golang.org/x/net/http/httpguts/.git: cannot open
go/src/golang.org/x/net/http/httpguts/.git' (No such file or directory) $ ls go/src/golang.org/x/net/http/httpguts/ guts.go httplex.go httplex_test.go $ ls -a go/src/golang.org/x/net/http/httpguts/ . .. guts.go httplex.go httplex_test.go
Ivan
Yeah, that
go env
output indicatesGOROOT="/usr/local"
, so the path/usr/local/src/golang.org/x/net/http/httpguts
would be inGOROOT/src
, but it's presumably not inGOROOT/src
because the correct path there (in Go 1.15rc2) would be/usr/local/src/vendor/golang.org/x/net/http/httpguts
.
@bcmills , it is hirely undesirable to use system sub-folders - I would be glad to stick to my directories inside the home folder. I can check by specifying $GOPATH (so it would point to "~/go") and report. Ivan
@advancedwebdeveloper, that depends on what the root cause turns out to be. 😅
Could you run
ls -d /usr/local/src/golang.org
andls -d /usr/local/src/vendor/golang.org
and post the results?
Surely I am able to do that:
$ ls -d /usr/local/src/golang.org ls: cannot access '/usr/local/src/golang.org': No such file or directory
dir. does not exist
$ ls -d /usr/local/src/vendor/golang.org ls: cannot access '/usr/local/src/vendor/golang.org': No such file or directory
same here.
Ivan
Change https://golang.org/cl/256319 mentions this issue: libgo: don't put golang.org packages in zstdpkglist.go
Change https://golang.org/cl/256362 mentions this issue: gollvm: don't add golang.org packges to zstdpkglist.go
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was trying to get StreamSets Data Collector Edge working.
What did you expect to see?
At least - no warning or errors.
What did you see instead?
@bradfitz, @FiloSottile , @alanbato, @mpvl - any suggestions?
Ivan