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

feat(manager/gomod): update indirect dependencies for Go Modules #19431

Merged
merged 3 commits into from Dec 15, 2022

Conversation

jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Dec 15, 2022

Changes

To allow folks to update their indirect dependencies for Go modules, we
can parse them as depType: indirect.

This introduces a new Package.enabled field to allow disabling the
packages, and re-enable packages after the fact.

Closes #19416, #19430.

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

I'm not sure we want indirect dependencies to be updated by default? I thought the idea would be to set enabled=false by default so that it's possible to override that using packageRules. And we'd also need to update the docs about that

@jamietanna jamietanna force-pushed the feature/gomod-transitive branch 2 times, most recently from a6317c4 to 37f6ceb Compare December 15, 2022 17:04
@jamietanna
Copy link
Contributor Author

Sorry yeah that was a misinterpretation on my part! I've updated to add that back 👍

@rarkins
Copy link
Collaborator

rarkins commented Dec 15, 2022

Just to clarify (because it's not easy to understand), enabled can be overridden by packageRules, but skipReason cannot

@jamietanna
Copy link
Contributor Author

Good to know, thanks! Do I need to change skipReason, now we're supporting this, or is it OK to leave it in?

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Also needs an update to the gomod readme to explain:

  • indirect dependencies aren't updated by default
  • how to re-enable them to using a package rule, to get updates

lib/modules/manager/gomod/extract.ts Outdated Show resolved Hide resolved
To allow folks to update their indirect dependencies for Go modules, we
can parse them as `depType: indirect`.

This introduces a new `Package.enabled` field to allow disabling the
packages, and re-enable packages after the fact.

Closes renovatebot#19416, renovatebot#19430.
lib/modules/manager/gomod/readme.md Outdated Show resolved Hide resolved
@rarkins rarkins enabled auto-merge (squash) December 15, 2022 18:34
@jamietanna
Copy link
Contributor Author

Thanks for helping get this over the line 🙌

@rarkins rarkins merged commit d19effc into renovatebot:main Dec 15, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 34.58.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jamietanna jamietanna deleted the feature/gomod-transitive branch December 15, 2022 20:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow updating indirect dependencies for Go Modules Capture indirect dependencies for Go Modules
4 participants