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: add option to ignore local replace/exclude directives #24666

Open
rsc opened this issue Apr 3, 2018 · 2 comments
Open

cmd/go: add option to ignore local replace/exclude directives #24666

rsc opened this issue Apr 3, 2018 · 2 comments
Labels
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Apr 3, 2018

If you have a go.mod with replace/exclude directives, those are used when building that module as the top-level target but not when used as a dependency. It might be helpful to have a command-line build flag that means "ignore those even in the top-level module" so that you can test more easily in the configuration users will see.

@rsc rsc added this to the vgo milestone Apr 3, 2018
@rsc rsc changed the title vgo: add option to ignore local replace/exclude directives x/vgo: add option to ignore local replace/exclude directives Apr 3, 2018
@rsc rsc modified the milestones: vgo, Go1.11 Jul 12, 2018
@rsc rsc added the modules label Jul 12, 2018
@rsc rsc changed the title x/vgo: add option to ignore local replace/exclude directives cmd/go: add option to ignore local replace/exclude directives Jul 12, 2018
@gopherbot
Copy link

Change https://golang.org/cl/126696 mentions this issue: cmd/go: replace -getmode with -mod, $GOPROXY

@thepudds
Copy link
Contributor

thepudds commented Aug 3, 2018

Note that change https://golang.org/cl/126696 states 'Fixes #24666' (this issue), which is presumably what triggered gopherbot to close this issue, but as far I as can see from quick look it looks like the piece of the CL related to this particular issue was in the first patch for the change but then (purposefully) dropped during the review process.

Not sure if the 'Fixes #24666' in the CL was left purposefully or accidentally, but at least wanted to add this comment here indicating that -mod=release does not seem to exist on master.

Description from the original patch:

If invoked with -mod=release, the go command ignores replace and exclude
directives in go.mod, essentially viewing the module as it would when
released and used as a dependency of another module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants