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

x/vgo: allow approximate matching for replace directives #24825

Closed
rogpeppe opened this issue Apr 12, 2018 · 2 comments
Closed

x/vgo: allow approximate matching for replace directives #24825

rogpeppe opened this issue Apr 12, 2018 · 2 comments
Milestone

Comments

@rogpeppe
Copy link
Contributor

@rogpeppe rogpeppe commented Apr 12, 2018

Currently a vgo replace directive specifies the replacement of an exact version of a module, but this means that if we're trying to override a module with a local version and for some reason a different version is selected (for example because we have updated some other module and it specifies a later version), the replacement will be ignored. This means that replacement directives are fragile.

Consider allowing a syntax where the specified version can omit the minor or patch version to match all minor versions or all patch versions for a given module.

For example:

replace "rsc.io/quote" v1 => "../quote"
@gopherbot gopherbot added this to the vgo milestone Apr 12, 2018
@IngCr3at1on
Copy link

@IngCr3at1on IngCr3at1on commented May 3, 2018

I would love to take a crack at trying to implement this if no-one is working on it already and it's wanted (have ran into this issue myself in a few cases).

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Jul 5, 2018

Change https://golang.org/cl/122400 mentions this issue: cmd/go/internal/modfile: allow replace without old version

Loading

@gopherbot gopherbot closed this in 1e80ef2 Jul 12, 2018
@golang golang locked and limited conversation to collaborators Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants