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: reject module path beginning with slash #28389

rsc opened this Issue Oct 25, 2018 · 1 comment


None yet
2 participants

rsc commented Oct 25, 2018

Re #28336, we should

  1. Reject go mod init /absolute/path.
  2. Refuse to load any go.mod that says module /absolute/path.

If we'd done either of those (we should do both), then the confusing build errors in #28336 would not have happened.

@rsc rsc added this to the Go1.12 milestone Oct 25, 2018


This comment has been minimized.

tandr commented Oct 25, 2018

To me it seems that denying full path in mod init would be counterproductive for people willing (or have no choice but) to specify a full path because thats how they have their build system set up

I would not be surprised to see this in a bootstrap script

go mod init /bigdisk/buildmount/$USER/$REPO/some/path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment