Repository navigation
Conversation
Defer dependency extraction until all workspaces have been considered, prefer configurations enabling more Cargo features, and use deterministic tie-breaking.
Add tests for extraction of dependency files with different features enabled in different manifest files.
Regenerate existing integration-test expectations to account for manifest reloads in the deferred dependency extraction pass.
paldepind
force-pushed
the
rust/inconsistent-feature
branch
from
October 20, 2026 11:25
3b50eaf to
a3e8174
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: When a project under extraction contains multiple
Cargo.tomlfiles, theCargo.tomlfiles might specify overlapping dependencies but enable different features for the dependencies.The extractor previously extracted each dependency file using whichever
Cargo.tomlit encountered first in a hash-map. This made extraction non-deterministic.Fix: This PR defers dependency extraction until all
Cargo.tomlfiles have been examined, then selects a configuration per file, preferring the one with more enabled features and using deterministic tie-breaking based on paths. Once that is done, the "winning" manifests are reloaded to extract the dependency files for which they "won".Note to reviewer:
mainfunction, specifically how we now have twoforloops over manifests and in the first pass defer extracting dependency files and instead calldependencies.add_file.test_dependency_features.pyattempt to give an overview.