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

New feature resolver triggers extra downloads sometimes. #8776

Closed
ehuss opened this issue Oct 13, 2020 · 0 comments · Fixed by #8823
Closed

New feature resolver triggers extra downloads sometimes. #8776

ehuss opened this issue Oct 13, 2020 · 0 comments · Fixed by #8823
Labels
A-features2 Area: issues specifically related to the v2 feature resolver C-bug Category: bug

Comments

@ehuss
Copy link
Contributor

ehuss commented Oct 13, 2020

Problem
The new feature resolver -Zfeatures can trigger downloads of packages that aren't needed. Some examples in Cargo's testsuite are:

  • cfg::ignore_version_from_other_platform
  • offline::offline_unused_target_dep
  • registry::only_download_relevant

Possible Solution(s)
The problem is this line which is checking if a package is a proc-macro. That line should probably be moved down into the map, but that doesn't completely solve the problem.

This will probably be tricky to fix. The check for proc-macro needs to be deferred until after other filter checks (like if the dependency is optional). The deps() method will probably need to be changed to accommodate smarter filtering.

Notes

cargo 1.48.0-nightly (9d1a4863a 2020-10-05)

@ehuss ehuss added C-bug Category: bug A-features2 Area: issues specifically related to the v2 feature resolver labels Oct 13, 2020
@bors bors closed this as completed in 862df61 Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-features2 Area: issues specifically related to the v2 feature resolver C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant