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

rogpeppe opened this issue Apr 12, 2018 · 2 comments


Copy link

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 "" v1 => "../quote"

@gopherbot gopherbot added this to the vgo milestone Apr 12, 2018


This comment has been minimized.

Copy link

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


This comment has been minimized.

Copy link

commented Jul 5, 2018

Change 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.
None yet
3 participants
You can’t perform that action at this time.