Skip to content

enable updating transitive dependencies with solver#10776

Merged
randhircs merged 3 commits intomainfrom
dev/brettfo/nuget-transitive-solve
Oct 17, 2024
Merged

enable updating transitive dependencies with solver#10776
randhircs merged 3 commits intomainfrom
dev/brettfo/nuget-transitive-solve

Conversation

@brettfo
Copy link
Copy Markdown
Contributor

@brettfo brettfo commented Oct 10, 2024

Previously if updating a transitive dependency, it was just pinned and no conflict resolution was performed.

This PR fixes that by elevating the check for using the dependency solver up one function. This enables a transitive dependency to be fixed by updating the top-level package. The solver has always had this capability, but it was bypassed in the transitive case.

The following other changes were performed:

  • Add test helper DependencySolverEnvironment to make unit testing the dependency solver easier; fewer magic strings.
  • Rename ResolveDependencyConflictsNew => ResolveDependencyConflicts
  • Rename ResolveDependencyConflictsOld => ResolveDependencyConflictsWithBruteForce

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Oct 10, 2024
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This function is what enables the correct behavior; updating a transitive dependency by updating a top-level one.

@JamieMagee
Copy link
Copy Markdown
Member

@brettfo should this smoke test be merged too? dependabot/smoke-tests#219

@brettfo brettfo force-pushed the dev/brettfo/nuget-transitive-solve branch 2 times, most recently from 676f56e to eb32a82 Compare October 15, 2024 22:01
@brettfo brettfo marked this pull request as ready for review October 15, 2024 22:22
@brettfo brettfo requested a review from a team as a code owner October 15, 2024 22:22
@JamieMagee JamieMagee force-pushed the dev/brettfo/nuget-transitive-solve branch from d2cad34 to 4759dbd Compare October 17, 2024 15:52
@randhircs randhircs merged commit 1f44347 into main Oct 17, 2024
@randhircs randhircs deleted the dev/brettfo/nuget-transitive-solve branch October 17, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: dotnet:nuget NuGet packages via nuget or dotnet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants