Use rust_out{exe_suffix} for doctests#95836
Conversation
|
r? @notriddle (rust-highfive has picked a reviewer for you, use r? to override) |
|
For maximum portability and future proofing you may want to use one of the consts in |
|
Oh nice, I didn't even know those existed. You learn something new every day etc. |
|
@bors r+ |
|
📌 Commit d483220 has been approved by |
…ddle
Use rust_out{,.exe,.wasm} for doctests
This was mentioned as an issue to me by `@bruxisma.` There are 3 separate instances where "rust_out" can become part of the name of a Rust executable, so I am mostly just hoping that this fixes the problem, given that the other sites which it can slip in seem to be well-behaved.
|
You’re right, of course. Cross-compiling matters. @bors r- |
|
Honestly, I'm surprised we don't have a single unified interface for handling emitting binaries in the compiler that everyone is forced to go through. Or maybe I'm just missing something. |
|
I was going to investigate adding a relatively thorough test but having done more digging, persisting doctests and runtool are both unstable features, as are target spec jsons (the case this doesn't directly handle now), of course. I can investigate a further improvement in a later PR but this is already starting to get a bit afield of rustdoc's specialties and is in any case more correct than what was there before. @rustbot label: -S-waiting-on-author +S-waiting-on-review |
|
@bors r+ rollup |
|
📌 Commit 7882cf7ff44e5faa8bda9e159d03116c7e092434 has been approved by |
|
⌛ Testing commit 7882cf7ff44e5faa8bda9e159d03116c7e092434 with merge 69aab9ae8baa2490718c54ae633f447beaaa16bf... |
|
💔 Test failed - checks-actions |
this probably just needs to use |
|
Oh, sorry! I had forgotten about this. ^^; |
670a69a to
9808534
Compare
This will use rust_out.exe for doctests on Windows, rust_out.wasm for doctests in the wasm case, and also handles cross-compiling or user-provided targets.
9808534 to
47ddca6
Compare
rust_out{exe_suffix} for doctests
|
Okay. New version should handle every single case, including user-provided targets, smoothly. |
|
@bors r+ rollup |
…ddle
Use `rust_out{exe_suffix}` for doctests
This was mentioned as an issue to me by `@bruxisma.` There are 3 separate instances where "rust_out" can become part of the name of a Rust executable, so I am mostly just hoping that this fixes the problem, given that the other sites which it can slip in seem to be well-behaved.
…ddle
Use `rust_out{exe_suffix}` for doctests
This was mentioned as an issue to me by ``@bruxisma.`` There are 3 separate instances where "rust_out" can become part of the name of a Rust executable, so I am mostly just hoping that this fixes the problem, given that the other sites which it can slip in seem to be well-behaved.
…ddle
Use `rust_out{exe_suffix}` for doctests
This was mentioned as an issue to me by ```@bruxisma.``` There are 3 separate instances where "rust_out" can become part of the name of a Rust executable, so I am mostly just hoping that this fixes the problem, given that the other sites which it can slip in seem to be well-behaved.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#95836 (Use `rust_out{exe_suffix}` for doctests) - rust-lang#104882 (notify lcnr on changes to `ObligationCtxt`) - rust-lang#104892 (Explain how to get the discriminant out of a `#[repr(T)] enum` with payload) - rust-lang#104917 (Allow non-org members to label `requires-debug-assertions`) - rust-lang#104931 (Pretty-print generators with their `generator_kind`) - rust-lang#104934 (Remove redundant `all` in cfg) - rust-lang#104944 (Support unit tests for jsondoclint) - rust-lang#104946 (rustdoc: improve popover focus handling JS) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
|
Awesome! Thank you for reminding me about this! |
This was mentioned as an issue to me by @bruxisma. There are 3 separate instances where "rust_out" can become part of the name of a Rust executable, so I am mostly just hoping that this fixes the problem, given that the other sites which it can slip in seem to be well-behaved.