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

x/pkgsite: pkg.go.dev proxy breaks multi-module repositories #73143

Closed
intel352 opened this issue Apr 2, 2025 · 2 comments
Closed

x/pkgsite: pkg.go.dev proxy breaks multi-module repositories #73143

intel352 opened this issue Apr 2, 2025 · 2 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. pkgsite
Milestone

Comments

@intel352
Copy link

intel352 commented Apr 2, 2025

What is the URL of the page with the issue?

https://go.dev/doc/modules/managing-source#multiple-module-source

What is your user agent?

n/a

Screenshot

When following the documentation at https://go.dev/doc/modules/managing-source#multiple-module-source, it says that multiple modules can be hosted within a single repository, explicitly using a Version tag format that has a slash.

For example, for module example.com/mymodules/module1 below, you would have the following for version v1.2.3:

Module path: example.com/mymodules/module1
Version tag: module1/v1.2.3
Package path imported by a user: example.com/mymodules/module1/package1
Module path and version as specified in a user’s require directive: example.com/mymodules/module1 v1.2.3

When I attempt to fetch a module in such a way, the go proxy causes go get to fail with an error such as invalid: disallowed version string.

According to #38861, this is a known issue and the guidance is to ditch the proxy and fetch direct.

I'd like to argue that either the proxy itself should be corrected to properly support this documented functionality, or else the documentation itself should be updated to reflect that this is a poorly supported feature and note the workaround that must be utilized to make the feature available.

What did you do?

See above

What did you see happen?

See above

What did you expect to see?

See above

@gopherbot gopherbot added this to the Unreleased milestone Apr 2, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 3, 2025
@seankhliao
Copy link
Member

Nothing is broken, repo tags contain the subdirectory prefix with a slash separating the version.
When requesting the module, the version is just the version number, the prefix is omitted as it's part of the module name.

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants