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

Comments

Projects
None yet
3 participants
@rogpeppe
Contributor

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

This comment has been minimized.

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

This comment has been minimized.

gopherbot commented Jul 5, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment