You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing some tests with cargo-guppy + the v2 resolver, and it appears that currently, proc macros specified in the initial set participate in feature resolution for the host, not just the target platform.
The first line is for the host, which looks correct: normal + build + macro-normal
The second line is for the target, in which case macro-normal-feature is included. This shouldn't be because proc macros are built on the host only, not the target.
Notes
Output of cargo version:
cargo 1.45.0-nightly (9fcb8c1d2 2020-05-25)
Also reproduces with 15bb455, which is the pinned version here.
sunshowers
changed the title
v2 resolver: proc macros specified in initials participate in feature resolution for host
v2 resolver: proc macros specified in initials participate in feature resolution for both target and host
Jun 2, 2020
I'm trying to think if it would be possible to special-case this, but there are many edge cases that are difficult to deal with. I'm not sure if it is feasible to do it any other way.
Sounds good, thanks! Just wanted to make sure it was on the radar. If you decide not to fix it, feel free to close this issue and I can refer to it in guppy.
Problem
I'm writing some tests with
cargo-guppy
+ the v2 resolver, and it appears that currently, proc macros specified in the initial set participate in feature resolution for the host, not just the target platform.Steps
Test workspace is here.
Note these two lines from the output:
Note that
external
is built twice:macro-normal-feature
is included. This shouldn't be because proc macros are built on the host only, not the target.Notes
Output of
cargo version
:Also reproduces with 15bb455, which is the pinned version here.
This can also be reproduced with the
cargo-compare
tool checked into the repo. Check out my test branch https://github.com/sunshowers/cargo-guppy/tree/cargo-compare-fix, then run:cc @ehuss
The text was updated successfully, but these errors were encountered: