-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Update mdbook #106520
Update mdbook #106520
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Hm, this may be more challenging than I anticipated. @rustbot author |
rustix's compilation detection isn't great (https://github.com/bytecodealliance/rustix/blob/main/build.rs#L185). In general I think such attempts are often quite painful for build systems that are managing multiple rustc's or otherwise trying to avoid incorrect usage. For example, if you were trying to do distributed compilation via sccache or similar this would be annoying. That said, at this point I'm not sure we can prevent their use, it's too wide spread. Nightly feature detection via such hacks is even worse (basically sitting on a ticking bomb that'll go off as soon as nightly feature changes it's API). I wonder if maybe at minimum having some option in Cargo to run build scripts with a RUSTC_FORCE_STABLE or something might be a "good" workaround. But I can't say I'm enthusiastic about it, definitely needs a lot of plumbing (rustc, cargo, etc). FWIW, if we don't need features, not setting RUSTC_BOOTSTRAP might be enough for this particular case; I believe we have allow-features and bootstrap as a stopgap for some other usage (cargo unstable features?) which might have other workarounds. But none of this really makes me happy. |
This comment has been minimized.
This comment has been minimized.
d901dc7
to
bac021e
Compare
@rustbot ready OK, here's a second attempt. I hit many roadblocks trying to reach this. An overview of how this works: Instead of passing This is now specified through a new method on the This is moderately risky, since I can't test every dependency of every target, and I can't test every I don't think removing RUSTC_BOOTSTRAP will completely solve the problem here. It is currently needed for -Zbinary-dep-depinfo in all cases. Also, I think it seems like a good goal to keep We could work with the crate authors to try to come to some other solution, but I don't know if they would be willing to remove the dynamic scanning. Another option is to work on cargo to better inform build scripts which flags they should be looking at, but that's a much harder project. |
Does removing the |
It might, but unfortunately there isn't an easy way to turn it off. |
@bors r+ rollup=never I remain unhappy, but I don't have better options. This seems like a relatively painless solution in terms of maintaining rustbuild at least. Long-term I guess we need something like user-opt-in to nightly feature use in a way that doesn't suffer from the problems of Cargo features (i.e., too hard to disable, default-features, etc.). |
Thanks! Yea, I'm not happy about adding this, either. I'd be up for discussing longer-term solutions. One idea is to somehow combine
Then, most of the bootstrap tools just set Anyway, just a half-baked idea. Let me know if you'd be interested in pursuing something. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e9e0908): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
This updates mdbook from 0.4.21 to 0.4.25. The list of changes is here. The only user-visible changes are some changes around the theme picker, and change to the copy-to-clipboard ignoring hidden lines.
Internally there were some dependency updates and small fixes.
This also updates
clap
from 4.0.15 to 4.0.32 whose changelog is here. This impacts tools like cargo. I don't see anything particularly noteworthy there, though there are some small user-visible changes.Unfortunately this required adding a hack for building
rustix
with a bootstrap tool. The comment explains why. I am unable to think of some other workaround (or even a cleaner way to set the rustflag). Ideas are welcome if you can think of alternatives. I'm struggling to even think of a long-term solution, other than asking projects not to do auto-nightly feature detection.One medium-term solution is to avoid the clap dependency for the mdbook library (which is how rustix gets pulled in). That is one of my goals for the 0.5 release of mdbook, but that probably won't happen until later this year. It would also require dropping clap from
rustbook
and using some other means to parse arguments (there's only two options, so it can probably be done manually).