-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix building libstd without backtrace feature #64444
Conversation
Thanks! I think this ended up having a bit more |
@alexcrichton is |
58ee5a7
to
b609547
Compare
@alexcrichton I implemented your suggestion. However, for reasons I do not understand, it still builds "backtrace-sys" even when the backtrace feature is not set:
|
Ah, I suppose the reason is this in backtrace's
|
This comment has been minimized.
This comment has been minimized.
Looks great! Just one minor nit and otherwise r=me |
@alexcrichton done (I made @bors r=alexcrichton However, do you have any idea how we could avoid building backtrace-sys when the backtrace feature is not set? Seems like currently, setting the |
📌 Commit 49854c4 has been approved by |
It may be sort of roundaboutedly possible but it's probably best to just have a feature for the crate itself which, if disabled, causes the build script to return immediately. That way when the |
fix building libstd without backtrace feature Fixes rust-lang#64410 r? @alexcrichton
So, implicitly enabling "foo" when "foo/feature" is enabled is deliberate? That's quite unfortunate as it is a serious reduction in expressivity; not doing that would be easily worked around by enabling both "foo" and "foo/feature" when needed. Is there a tracking issue for such improvements/changes to the feature mechanism (I guess this one would have to be opt-in or tied to an "edition" or so)? |
@RalfJung there is an issue about this: rust-lang/cargo#3494 See also my comment in one of its dupes for a possible syntax that doesn't require a new edition: rust-lang/cargo#7259 (comment) |
Rollup of 10 pull requests Successful merges: - #63955 (Make sure interned constants are immutable) - #64028 (Stabilize `Vec::new` and `String::new` as `const fn`s) - #64119 (ci: ensure all tool maintainers are assignable on issues) - #64444 (fix building libstd without backtrace feature) - #64446 (Fix build script sanitizer check.) - #64451 (when Miri tests are not passing, do not add Miri component) - #64467 (Hide diagnostics emitted during --cfg parsing) - #64497 (Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given) - #64499 (Use `Symbol` in two more functions.) - #64504 (use println!() instead of println!("")) Failed merges: r? @ghost
Fixes #64410
r? @alexcrichton