You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you'll look into go.mod, you'll see it's defined as bpxe.org. GitHub serves HTML meta tags for it, but they are set for github.com/bpxe/bpxe.
But if I use go get github.com/bpxe/bpxe, I'll naturally get this:
module declares its path as: bpxe.org
but was required as: github.com/bpxe/bpxe
Which is not fatal, of course, but is definitely annoying.
Renaming a module. Let's say there's cockroachdb and if they decide to use a different name (say, cockroachdb.com/cockroachdb), if packages that use github.com/cockroachdb/cockroach will want to stay up to date, they'll have to be notified of the renaming as they won't be able to figure that out easily.
So, my rough proposal would be to augment module validation to something like this: if a module declares its path as A but was required as B, try to "go get" B and see if it resolves to the same VCS URL as A. If it does, it is in fact the same module.
Any thoughts?
The text was updated successfully, but these errors were encountered:
Because Bryan is working on a plan for this already,
we don't need to track this idea in this issue as well, so
I am going to close this issue as "coming soon".
rsc
changed the title
Proposal: canonical module aliasing
proposal: cmd/go: canonical module aliasing
Jul 14, 2021
As per the Proposal Process, opening this brief issue for a discussion.
There are a few cases where module naming get messy. These are the ones I observed so far:
As an example, I'll use one of my projects: https://github.com/bpxe/bpxe
If you'll look into go.mod, you'll see it's defined as bpxe.org. GitHub serves HTML meta tags for it, but they are set for
github.com/bpxe/bpxe
.But if I use
go get github.com/bpxe/bpxe
, I'll naturally get this:Which is not fatal, of course, but is definitely annoying.
cockroachdb.com/cockroachdb
), if packages that usegithub.com/cockroachdb/cockroach
will want to stay up to date, they'll have to be notified of the renaming as they won't be able to figure that out easily.So, my rough proposal would be to augment module validation to something like this: if a module declares its path as A but was required as B, try to "go get" B and see if it resolves to the same VCS URL as A. If it does, it is in fact the same module.
Any thoughts?
The text was updated successfully, but these errors were encountered: