[NET-6741] make: Add target for updating dependencies across all modules#19785
Conversation
|
After talking w/ Matt K., we think |
|
Update:
|
To enable more consistent and error-proof dependency management, add a Make target that will set a dependency version across all submodules that require it. Also runs `go mod tidy`. This first ensures the dependency addition is reverted if the module in question does not require it; it also ensures that any additional cleanup needed in `go.mod`/`go.sum` is applied.
c0704a6 to
6f0e24c
Compare
|
@zalimeni, a backport is missing for this PR [19785] for versions [1.15] please perform the backport manually and add the following snippet to your backport PR description: |
5 similar comments
|
@zalimeni, a backport is missing for this PR [19785] for versions [1.15] please perform the backport manually and add the following snippet to your backport PR description: |
|
@zalimeni, a backport is missing for this PR [19785] for versions [1.15] please perform the backport manually and add the following snippet to your backport PR description: |
|
@zalimeni, a backport is missing for this PR [19785] for versions [1.15] please perform the backport manually and add the following snippet to your backport PR description: |
|
@zalimeni, a backport is missing for this PR [19785] for versions [1.15] please perform the backport manually and add the following snippet to your backport PR description: |
|
@zalimeni, a backport is missing for this PR [19785] for versions [1.15] please perform the backport manually and add the following snippet to your backport PR description: |
To enable more consistent and error-proof dependency management, add a Make target that will set a dependency version across all submodules that require it.
Also runs
go mod tidy. This first ensures the dependency addition is reverted if the module in question does not require it; it also ensures that any additional cleanup needed ingo.mod/go.sumis applied.Note on approach vs.
go.workAt one point, it seemed we could avoid executing
go getper eachgo.modby instead moving to a versionedgo.workand using workspace-based dependency management commands. Though there's still reasons to move togo.workbeyond this change, it probably won't work for bumping dependencies conveniently:go work syncconsolidates versions using MVS, so in practice, it seems we still need to use a visit-all approach to be able to blindly bump a given dependency only where it’s used.go work syncsimply enforces consistency across all go.mod files once any go.mod is updated (docs):Description
Simplify dependency management, particularly for addressing CVEs where a consistent minimum version is required.
Example run:
PR Checklist