Closed fortuna closed 1 year ago
There are two modules involved:
github.com/Jigsaw-Code/outline-internal-sdk
, andgithub.com/Jigsaw-Code/outline-internal-sdk/x
.At HEAD, github.com/Jigsaw-Code/outline-internal-sdk/x
contains an outline-connectivity
package, and github.com/Jigsaw-Code/outline-internal-sdk
does not.
What is the concrete problem you are trying to solve, and what is the end state that you want to end up in?
This is the problem:
$ go run github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity@latest
go: github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity@latest (in github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity@v0.0.0-20230505210647-dbe3f575a4d7):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
When I try to use outline-connectivity, it thinks it's the github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity
module, instead of the github.com/Jigsaw-Code/outline-internal-sdk/x
module.
I need to get rid of the github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity
module, which shouldn't exist in the first place. Go should interpret github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity
as a package in the github.com/Jigsaw-Code/outline-internal-sdk/x
module instead.
I need to get rid of the github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity module, which shouldn't exist in the first place.
Ah! So, that's supposed to be solvable using retract
. (I'd prefer #39007 even more, but haven't gotten much traction on that.)
Here's what I think ought to work:
go.mod
file existed. (Probably Jigsaw-Code/outline-internal-sdk@dbe3f575a4d7b02e444ef95fe480390c7234d81b?)x/outline-connectivity/go.mod
, add a retract
directive covering the whole range of pseudo-versions up to a new version that we're going to create. (See the examples at https://go.dev/ref/mod#go-mod-file-retract.)
retract [v0.0.0-0, v0.1.0-retracted]
git commit
that change, and then apply the tag corresponding to the version at the end of the retraction range:
git tag -a x/outline-connectivity/v0.1.0-retracted
That should cause go install
to skip over the retracted versions of the inner module and fall back to the next-longest module path (the intended x
module). Please give that a shot and let me know how it goes.
It works!
$ go run github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity@latest
Usage of /var/folders/rt/m2vyf3bd4jvfyl2zbcdrr7xc0010qy/T/go-build1262098280/b001/exe/outline-connectivity:
-domain string
Domain name to resolve in the test (default "example.com.")
-key string
Outline access key
-proto string
Comma-separated list of the protocols to test. Muse be "tcp", "udp", or a combination of them (default "tcp,udp")
-resolver string
Comma-separated list of addresses of DNS resolver to use for the test (default "8.8.8.8,2001:4860:4860::8888")
-v Enable debug output
exit status 1
For reference, this is the mod file: https://github.com/Jigsaw-Code/outline-internal-sdk/blob/x/outline-connectivity/v0.1.0-retracted/x/outline-connectivity/go.mod
It still shows up as a submodule on the documentation site:
But it's mostly cosmetic, since when I click on it, is shows in the right module now:
I'm glad it worked out! Hopefully the Module
chip is just some stale indexing in the database — but if it doesn't disappear in a day or two consider filing a separate pkgsite issue for that.
Should we close this issue as resolved? (Are there any other lingering problems from the retraction?)
Timed out in state WaitingForInfo. Closing.
(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)
What is the path of the package that you would like to have removed?
github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity
Are you the owner of this package?
Yes
What is the reason that you could not retract this package instead?
Module
github.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity
obscures packageoutline-connectivity
in modulegithub.com/Jigsaw-Code/outline-internal-sdk/x/outline-connectivity
. Retracting doesn't seem to work in that case.