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

Comments

Projects
None yet
6 participants
@rsc
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 from vgo: add option to ignore local replace/exclude directives to 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 from x/vgo: add option to ignore local replace/exclude directives to cmd/go: add option to ignore local replace/exclude directives Jul 12, 2018

@gopherbot

This comment has been minimized.

gopherbot commented Jul 30, 2018

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

@gopherbot gopherbot closed this in 30a84b3 Aug 1, 2018

@thepudds

This comment has been minimized.

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