Skip to content
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

Fix crate pruning #61

Merged
merged 7 commits into from
Jan 12, 2024
Merged

Fix crate pruning #61

merged 7 commits into from
Jan 12, 2024

Conversation

Jake-Shadle
Copy link
Member

Previously the graph was built by going from each root package to each of its dependencies recursively until all packages that were referenced were visited. This mostly worked fine, however had issues, namely #60, that were caused by there being tension between our view of the graph and cargo metadata's. cargo metadata presents a "complete" view of a graph, however if a user requested only packages for specific platforms or only of specific kinds, we were still including features that cargo metadata had resolved with its complete view of the graph, even if those features were only enabled by an edge that was otherwise pruned.

So now, we just does our own resolution by recursively walking each package + feature combination rooted at the features enabled on each root crate which allows us to accurately prune nodes as we go rather than doing complicated fixup passes or the like

Resolves: #60

Previously the graph was built by going from each root package to each of its dependencies recursively until all packages that were referenced were visited. This mostly worked fine, however had issues, namely #60, that were caused by there being tension between our view of the graph and cargo metadata's. `cargo metadata` presents a "complete" view of a graph, however if a user requested only packages for specific platforms or only of specific kinds, we were still including features that `cargo metadata` had resolved with its complete view of the graph, even if those features were only enabled by an edge that was otherwise pruned.

So now, we just does our own resolution by recursively walking each package + feature combination rooted at the features enabled on each root crate which allows us to accurately prune nodes as we go rather than doing complicated fixup passes or the like
@Jake-Shadle Jake-Shadle merged commit b583d96 into main Jan 12, 2024
6 checks passed
@Jake-Shadle Jake-Shadle deleted the fix-pruning branch January 12, 2024 11:04
Tastaturtaste added a commit to Tastaturtaste/argmin that referenced this pull request Jan 14, 2024
stefan-k pushed a commit to stefan-k/argmin that referenced this pull request Mar 7, 2024
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.

Dev only features aren't pruned
1 participant