-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Run go mod tidy
in subdirectories
#19270
Comments
I think that running |
Hi there, Get your issue fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction. We may close the issue if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
We can probably use a similar approach like in nuget manager. |
Thanks for the fast feedback! Here is a reproduction repository with a failing PR created by renovate: gnuletik/renovate-repro-19270#1 |
Reproduction forked to https://github.com/renovate-reproductions/19270 |
Ideal solution: build a dependency graph between the Pragmatic alternative solution: a new option |
Other possible simple solution: run renovate on indirect dependencies too. Those lines are currently ignored here:
renovate/lib/modules/manager/gomod/extract.ts Line 125 in 0f2eb5d
We could add a new option What do you think about this @rarkins ? |
I thought we maybe had an open issue already about updating indirect dependencies, but I can't find it. However I found #12999, and it looks like we could combine/close this issue as a duplicate? |
I agree on the idea of indirect though. I think we should include such dependencies in what we extract, but mark them as depType=indirect, enabled=false. That way you can add a package rule with matchManagers=gomod, matchDepTypes=indirect, enabled=true which then overrides the default approach. |
Thanks for the feedback ! Definitely agree to close this issue as a duplicate then 👍 |
Duplicate of #12999 |
What would you like Renovate to be able to do?
When repo has the following architecture:
go.mod
cmd/example/go.mod
go.sum
files are omitted here.Reproduction repo here: https://github.com/gnuletik/renovate-repro-19270
Failing renovate PR: gnuletik/renovate-repro-19270#1
In a scenario where:
golang.org/x/text
should be updated fromv0.4.0
tov0.5.0
renovate.json
with"postUpdateOptions": ["gomodTidy"]
Renovate creates a PR which updates
go.mod
andgo.sum
files at the repository root.However, this breaks the
cmd/example
package which also needs to be updated tov0.5.0
(in the indirect dependencies part).Note: This issue only occurs for indirect dependencies upgrade.
If you have any ideas on how this should be implemented, please tell us here.
Could
go mod tidy
be executed in every sub-packages in the repo?Is this a feature you are interested in implementing yourself?
Yes
The text was updated successfully, but these errors were encountered: