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

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 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).

@gopherbot
Copy link

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

@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
Development

No branches or pull requests

3 participants