Adds the filter_target flag when gathering cargo metadata.#395
Adds the filter_target flag when gathering cargo metadata.#395amzn-aeline wants to merge 2 commits intogeiger-rs:masterfrom
filter_target flag when gathering cargo metadata.#395Conversation
|
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.
I would probably just do:
| None | |
| } else { | |
| None | |
| } | |
| } | |
| None |
There was a problem hiding this comment.
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_targetwill be added to the cargo command.The target is chosen as follows:
rustcand determine the default targetSimilar to: rust-lang/rust-analyzer#6912