Skip to content
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

cmd/go: cannot find module for gonum.org/v1/gonum/stat/distmv #26632

Closed
pwaller opened this issue Jul 26, 2018 · 3 comments
Closed

cmd/go: cannot find module for gonum.org/v1/gonum/stat/distmv #26632

pwaller opened this issue Jul 26, 2018 · 3 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@pwaller
Copy link
Contributor

pwaller commented Jul 26, 2018

I'm running the master branch as of this morning: devel +e5b1340 Wed Jul 25 23:53:54 2018 +0000 linux/amd64.

The following (importing gonum.org/v1/gonum/stat/distmv and syncing) does not work as I expect it to:

$ mkdir tmp && cd tmp
$ go mod -init -module foo.to/tmp
go: creating new go.mod: module foo.to/tmp

$ echo $'package tmp\nimport "gonum.org/v1/gonum/stat/distmv"' > tmp.go

$ go mod -sync
go: finding gonum.org/v1/gonum/stat/distmv latest
go: finding gonum.org/v1/gonum/stat latest
go: finding gonum.org/v1/gonum latest
go: import "foo.to/tmp" ->
	import "gonum.org/v1/gonum/stat/distmv": cannot find module providing package gonum.org/v1/gonum/stat/distmv

Apologies that I don't have time to dig deeper into this at the moment. One possible culprit seems to be build tags, as mentioned in the gonum vgo meta issue.

Other discussion: golang-dev thread.

@agnivade agnivade added modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jul 27, 2018
@rogpeppe
Copy link
Contributor

FWIW I can't reproduce this (go version devel +b39fb9ec85 Fri Jul 27 16:29:52 2018 +0000 linux/amd64
).

What git version are you using?

@pwaller
Copy link
Contributor Author

pwaller commented Jul 29, 2018

What git version are you using?

git version 2.7.4

Here's the output of go mod -sync:

$ go mod -sync -x
# /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030 for git2 https://github.com/gonum/gonum
cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git ls-remote -q https://github.com/gonum/gonum
0.392s # cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git ls-remote -q https://github.com/gonum/gonum
go: finding gonum.org/v1/gonum/stat/distmv latest
cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git -c log.showsignature=false log -n1 --format=format:%H %ct %D cebdade430ccb61c1feba4878085f6cf8cb3320e
0.002s # cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git -c log.showsignature=false log -n1 --format=format:%H %ct %D cebdade430ccb61c1feba4878085f6cf8cb3320e
cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git tag -l
0.002s # cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git tag -l
cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git fetch -f --depth=1 https://github.com/gonum/gonum cebdade430ccb61c1feba4878085f6cf8cb3320e:refs/dummy
0.345s # cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git fetch -f --depth=1 https://github.com/gonum/gonum cebdade430ccb61c1feba4878085f6cf8cb3320e:refs/dummy
go: finding gonum.org/v1/gonum/stat latest
go: finding gonum.org/v1/gonum latest
go: import "foo.to/tmp" ->
	import "gonum.org/v1/gonum/stat/distmv": cannot find module providing package gonum.org/v1/gonum/stat/distmv

If I run cd /home/pwaller/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030; git fetch -f --depth=1 https://github.com/gonum/gonum cebdade430ccb61c1feba4878085f6cf8cb3320e:refs/dummy, it returns exit status 1.

git cat-file -p cebdade430ccb61c1feba4878085f6cf8cb3320e works just fine in a fresh clone, but not from the /mod/cache/vcs/... directory, (I also tried setting GIT_DIR to point there, but I get back:

~/.local/src/mod/cache/vcs/4ad966aa57dadda5e35c195a5db2854067afd6f28b21af1b907991523a199030$ GIT_DIR=. git cat-file -p cebdade430ccb61c1feba4878085f6cf8cb3320e
fatal: Not a valid object name cebdade430ccb61c1feba4878085f6cf8cb3320e

The git fetch doesn't print any errors, so that's weird.

In case it's relevant, I also have this set in my $HOME/.gitconfig:

[url "ssh://git@github.com/"]
         insteadOf = https://github.com/
         insteadOf = git://github.com/

@pwaller
Copy link
Contributor Author

pwaller commented Jul 31, 2018

I can't currently reproduce this unfortunately, and I don't know what caused it to be fixed. Perhaps a bad cache from a previous dev version of go/vgo.

Closing, will reopen if I hit it again.

@pwaller pwaller closed this as completed Jul 31, 2018
@golang golang locked and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants