-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 custom build] Implement platform-specific dependencies #735
Conversation
@@ -23,7 +23,8 @@ pub enum ResolveMethod<'a> { | |||
ResolveEverything, | |||
ResolveRequired(/* dev_deps = */ bool, | |||
/* features = */ &'a [String], | |||
/* uses_default_features = */ bool), | |||
/* uses_default_features = */ bool, | |||
/* target_platform = */ Option<String>), |
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.
This is actually called pretty frequently due to the recursive nature of resolve, and I think this could get away with the more cheap Option<&'a str>
, would that be possible?
de65c36
to
b79c99f
Compare
Updated |
b79c99f
to
b194050
Compare
Oops, I forgot to remove the call to |
b194050
to
075832e
Compare
Updated |
let platform = match method { | ||
ResolveRequired(_, _, _, ref platform) => { | ||
platform.clone() | ||
}, |
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.
It's probably ok to omit the ref
+ clone()
here (as well as below)
Looks fantastic, thanks @tomaka! I'll hold off on this pending the resolution of rust-lang/rfcs#403. |
77ebc37
to
a3c5b06
Compare
a3c5b06
to
1549b5c
Compare
BTW: I added a location in which we'll need to upload this information to the registry, you'll just need to fill it out: https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/registry.rs#L75 |
1549b5c
to
58cc1e0
Compare
58cc1e0
to
f16291d
Compare
Done |
Ah I knew I forgot one other location! https://github.com/rust-lang/cargo/blob/master/src/cargo/sources/registry.rs#L420 (I can fix this up after merging as well, which can hopefully happen today!) |
I fixed it too |
Thanks @tomaka! |
RFC was approved this afternoon, let's see what bors thinks of this! |
cc #610