Skip to content

Conversation

@smocherla-brex
Copy link
Contributor

@smocherla-brex smocherla-brex commented Oct 31, 2025

Fixes #1471. There's more detail there about the issue.

Make sure we don't traverse the dependency constraint edges while navigating the dependencies and create a cycle. This now succeeds. On master, if you add "androidx.fragment:fragment-ktx:1.6.1" and build after regenerating the lockfile the build fails due to many cycles.

bazel build @regression_testing_gradle//:all
WARNING: For repository 'platforms', the root module requires module version platforms@0.0.10, but got platforms@0.0.11 in the resolved dependency graph.
WARNING: For repository 'rules_shell', the root module requires module version rules_shell@0.3.0, but got rules_shell@0.4.1 in the resolved dependency graph.
INFO: Analyzed 302 targets (140 packages loaded, 1516 targets configured).
INFO: Found 302 targets...
INFO: Elapsed time: 1.020s, Critical Path: 0.59s
INFO: 5 processes: 1 internal, 2 darwin-sandbox, 2 worker.
INFO: Build completed successfully, 5 total actions

Updated the regression test, checking if unit test passes and also will look into adding a "full" unit test with some example dependencies having these constraints.

@smocherla-brex smocherla-brex marked this pull request as ready for review October 31, 2025 01:13
Copy link
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@shs96c shs96c merged commit 3300641 into bazel-contrib:master Nov 4, 2025
6 checks passed
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.

Gradle resolver can generate cycles with some dependencies

2 participants