-
Notifications
You must be signed in to change notification settings - Fork 393
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
cargo-bazel
now supports alias_rule
to customize the aliases generated
#2312
cargo-bazel
now supports alias_rule
to customize the aliases generated
#2312
Conversation
2299838
to
1cf5db2
Compare
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 looks great, thanks!
I'll leave this one open for a day or two in case anyone else wants to jump in, otherwise I left a few comments :))
1cf5db2
to
39af75f
Compare
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.
Generally LGTM modulo the comments :)
I intend to publish this to crates.io after review. This will be used to test bazelbuild#2312.
I intend to publish this to crates.io after review. This will be used to test bazelbuild#2312.
I intend to publish this to crates.io after review. This will be used to test #2312.
fb9c17f
to
326eed7
Compare
cargo-bazel
generated targets can optionally always use transition_opt_alias
to transition to compilation_mode=opt
.cargo-bazel
now supports alias_rule
to customize the aliases generated
326eed7
to
36df1f7
Compare
…` to apply transitions, including builtin ones for `compilation_mode=dbg|fastbuild|opt`.
36df1f7
to
ff6c8ec
Compare
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.
Surprisingly clean! Nicely put together, thanks!
Just one bikeshed to paint :)
crate_universe/src/config.rs
Outdated
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Clone)] | ||
pub enum AliasRule { | ||
#[default] | ||
#[serde(rename = "default")] |
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 be tempted to call this alias
or native.alias
rather than default
? WDYT?
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.
Will do!
641f09a
to
e944808
Compare
Motivator is to be able to set
default_alias_rule = "opt"
so that all Cargo fetched 3rd party dependencies are built withcompilation_mode=opt
regardless of whatcompilation_mode
the local code is being built with.Per my conversation with @illicitonion. Please bikeshed on naming 🙂