Navigation Menu

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: confusing docs for -dropreplace #34930

Closed
josharian opened this issue Oct 16, 2019 · 5 comments
Closed

cmd/go: confusing docs for -dropreplace #34930

josharian opened this issue Oct 16, 2019 · 5 comments
Labels
Documentation FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@josharian
Copy link
Contributor

josharian commented Oct 16, 2019

I wanted to programmatically drop all replace directives for a particular module.

Based on the docs, I initially thought just using -dropreplace=old, with no @v, would drop all replace directives for that module path:

The -replace=old[@v]=new[@v] and -dropreplace=old[@v] flags
add and drop a replacement of the given module path and version pair.
If the @v in old@v is omitted, the replacement applies to all versions
with the old module path.

It sounds from this like omitting the @v from a -dropreplace flag will make it apply to (drop) all versions with the old module path. What it actually does is drop any replace directives for that module path that do not specify a version.

It might be worth clarifying the docs a little.

@josharian
Copy link
Contributor Author

Closing in favor of #34943.

@josharian josharian changed the title cmd/go: no straightforward way to remove old replace directives cmd/go: confusing docs for -dropreplace Oct 17, 2019
@josharian
Copy link
Contributor Author

Re-opening as a documentation issue. Re-titled and edited content to make the concern clearer.

@julieqiu
Copy link
Member

/cc @jayconrod @bcmills

@julieqiu julieqiu added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 18, 2019
@jayconrod jayconrod added this to the Go1.14 milestone Oct 18, 2019
@ianlancetaylor
Copy link
Contributor

Ping @jayconrod @bcmills . Let's write docs for 1.14 or move to backlog. Thanks.

@gopherbot
Copy link

Change https://golang.org/cl/210340 mentions this issue: cmd/go: clarify -dropreplace help text in 'go help mod edit'

@golang golang locked and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants