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: go get panics on multi-module repository with circular module dependencies #57984

Closed
jaloren opened this issue Jan 25, 2023 · 1 comment

Comments

@jaloren
Copy link

jaloren commented Jan 25, 2023

Summary

The module github.com/sylr/rafty has a sub module https://github.com/sylr/rafty/tree/master/distributor/consistent. Each module requires the other. The repo currently has no semantic git version tags.

The go.mod for the consistent module has this requirement:

sylr.dev/rafty v0.0.0-20230125111348-4424dd2cf508

The go.mod for the rafty module has this requirement:

sylr.dev/rafty/distributor/consistent v0.0.0-20230125105721-bee3f99a9fe5

I verified both git hashes exist in the repo. I also verified that go build works fine in the repo.

What version of Go are you using (go version)?

go version go1.19.2 darwin/arm64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

Josephs-MacBook-Pro:binarysearch jlorenzini$ go get -v sylr.dev/rafty@latest
panic: internal error: can't find reason for requirement on sylr.dev/rafty/distributor/consistent@v0.0.0-20230125105721-bee3f99a9fe5

goroutine 1 [running]:
cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0x140000b6c30?, 0x140003d02e8?}, {0x140000b6150?, 0x140001ac3b8?}})
	/usr/local/go/src/cmd/go/internal/modget/get.go:1760 +0xf8
cmd/go/internal/modget.(*resolver).updateBuildList(0x140001ce400, {0x104c12510, 0x1400019a000}, {0x0, 0x0, 0x0})
	/usr/local/go/src/cmd/go/internal/modget/get.go:1765 +0x450
cmd/go/internal/modget.(*resolver).applyUpgrades(0x140001ce400, {0x104c12510, 0x1400019a000}, {0x0?, 0x1?, 0x104bf78a0?})
	/usr/local/go/src/cmd/go/internal/modget/get.go:1312 +0xc0
cmd/go/internal/modget.runGet({0x104c12510, 0x1400019a000}, 0x140001b8438?, {0x140001b4030, 0x1, 0x1})
	/usr/local/go/src/cmd/go/internal/modget/get.go:351 +0x3c8
main.invoke(0x104f02280, {0x140001b4010, 0x3, 0x3})
	/usr/local/go/src/cmd/go/main.go:225 +0x2f8
main.main()
	/usr/local/go/src/cmd/go/main.go:179 +0x7ac

What did you expect to see?

Go get should succeed.

What did you see instead?

Go get panics

@bcmills
Copy link
Contributor

bcmills commented Jan 25, 2023

Duplicate of #56494

@bcmills bcmills marked this as a duplicate of #56494 Jan 25, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2023
@bcmills bcmills changed the title affected/package: go get panics on multi-module repository with circular module dependencies cmd/go: go get panics on multi-module repository with circular module dependencies Jan 25, 2023
@golang golang locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants