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

fix: handle deps that also appear in replaces blocks in the go.mod #19

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

hectorj2f
Copy link
Member

With the new version of gobump, we drop any replacement and require block of a dependency we want to add as require or replace.

However when we add a dep to the deps and this dependency appears on a replace block in the go.mod. We need to use the old.path of the dependency to be able to drop the existing replacement and use the proposed dep bump.

gobump --packages=golang.org/x/[email protected]

To give an example, keda-2.9 has a replacement of the crypto dep that we want to bump https://github.com/kedacore/keda/blob/v2.9.1/go.mod#L99 and it also appears on a require block https://github.com/kedacore/keda/blob/v2.9.1/go.mod#L271. If we need to change the go.mod to use the new dep version, we need to drop the replace and require.

@hectorj2f hectorj2f self-assigned this Jan 17, 2024
Copy link
Member

@luhring luhring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but check with @rawlingsj per his comment

@rawlingsj rawlingsj merged commit ee5895f into chainguard-dev:main Jan 17, 2024
5 checks passed
@hectorj2f hectorj2f deleted the handle_replaces_requires branch January 17, 2024 20:56
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

Successfully merging this pull request may close these issues.

3 participants