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

Replaces fails - if the upstream project has defined the dependency in both a 'replace' and a 'require' block #38

Open
mamccorm opened this issue Sep 15, 2024 · 1 comment

Comments

@mamccorm
Copy link

Example:

Upstream have set this in the 'replace' section:

github.com/containerd/containerd => github.com/containerd/containerd v1.6.22

And they also have this in the 'require' section:

github.com/containerd/containerd v1.7.6

If you try doing this using go/bump:

  - uses: go/bump
      replaces: github.com/containerd/containerd=github.com/containerd/[email protected]

It'll fail to apply, and complain that a newer version is already set (i.e in the require section). This is a bit of a strange implementation by the upstream project.

To address, we should drop the check that looks for a newer version in the go.mod, if the version is set in the 'replaces' block

@hectorj2f
Copy link
Member

I agree it looks like a weird configuration for their dependencies. I believe if we could allow setting only the replaces block in gobump this issue could be solved as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants