-
Notifications
You must be signed in to change notification settings - Fork 67
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
Adds the filter_target
flag when gathering cargo metadata.
#395
base: master
Are you sure you want to change the base?
Conversation
For some more context on this kind of change, see rust-lang/rust-analyzer#6908. Also, just for clarity, the Cargo flag here is |
None | ||
} else { | ||
None | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably just do:
None | |
} else { | |
None | |
} | |
} | |
None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is it worth maybe giving a warning or something if this fails?
Thanks amzn-aeline for the contribution and thanks for the review jonhoo And thanks for the context - so the |
Yes, looks like it. Though since we're reading |
Would be lovely if there is a crate to invoke / interrogate rustc metadata sans Command and duplicating the code here ? In the long run would be happy to get rid of all Command's and use some another crate for it that handles all the version diff's In 1.37 the behaviour is going to be different even if None ? Not too concerned about old rustc versions but just curiosity wise. Cheers |
I don't know of any unfortunately. Should be easy enough though. Maybe it could even be added as part of I don't know what |
Unless building for all targets is specified,
--filter_target
will be added to the cargo command.The target is chosen as follows:
rustc
and determine the default targetSimilar to: rust-lang/rust-analyzer#6912