Stabilize flags for doctest cross compilation by ehuss · Pull Request #137096 · rust-lang/rust (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
This makes the following changes in preparation for supporting doctest cross-compiling in cargo:
- Renames
--runtool
and--runtool-arg
to--test-runtool
and--test-runtool-arg
to maintain consistency with other--test-*
arguments. - Stabilizes the
--test-runtool
and--test-runtool-arg
. These are needed in order to support cargo'starget.runner
option which specifies a runner to execute a cross-compiled doctest (for example, qemu). - Stabilizes the
--enable-per-target-ignores
flag by removing it and making it unconditionally enabled. This makes it possible to disable a doctest on a per-target basis, which I think will be helpful for rolling out this feature.
These changes were suggested in https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stabilizing.20doctest.20xcompile/near/409281127
The intent is to stabilize the doctest-xcompile feature in cargo. This will help ensure that for projects that do cross-compile testing that their doctests are also covered. Currently there is a somewhat surprising behavior that they are ignored.
Closes #64245
try-job: x86_64-msvc-1
r? @fmease
rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
labels
This change is insta-stable, so needs a completed FCP to proceed.
label
ehuss mentioned this pull request
This comment has been minimized.
This PR modifies tests/run-make/
. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.
cc @jieyouxu
The Miri subtree was changed
cc @rust-lang/miri
This comment has been minimized.
On my review list now. :)
I think they've been around for enough time. Let's start an FCP then.
@rfcbot fcp merge
In playing around with this, I noticed a slight annoyance when using --edition=2024
and mergeable tests. It always prints:
WARNING: No rustdoc doctest environment variable provided so doctests will be run in the same process
I'm wondering if it would make sense to somehow silence that warning when using --test-runtool
?
I'm also wondering if it is the right choice to run in the same process. I could see arguments either way. Let me know if you have any opinion on that.
This comment has been minimized.
This renames --runtool
and --runtool-arg
to --test-runtool
and
--test-runtool-arg
to maintain consistency with other --test-*
arguments.
This removes the --enable-per-target-ignores
and enables it
unconditionally.
@rfcbot resolve forwarding-multi-args-mechanism
I'll be creating a separate PR for these flags.
🔔 This is now entering its final comment period, as per the review above. 🔔
This was referenced
Apr 15, 2025
The final comment period, with a disposition to merge, as per the review above, is now complete.
As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.
This will be merged soon.
Thanks everyone! @bors r+ rollup
📌 Commit 115341f has been approved by fmease
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-team
Status: Awaiting decision from the relevant subteam (see the T- label).
labels
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#137096 (Stabilize flags for doctest cross compilation)
- rust-lang#140148 (CI: use aws codebuild for job dist-arm-linux)
- rust-lang#140187 ([AIX] Handle AIX dynamic library extensions within c-link-to-rust-dylib run-make test)
- rust-lang#140196 (Improved diagnostics for non-primitive cast on non-primitive types (
Arc
,Option
)) - rust-lang#140210 (Work around cygwin issue on condvar timeout)
- rust-lang#140213 (mention about
x.py setup
inINSTALL.md
) - rust-lang#140229 (
DelimArgs
tweaks) - rust-lang#140248 (Fix impl block items indent)
r? @ghost
@rustbot
modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#137096 (Stabilize flags for doctest cross compilation)
- rust-lang#140148 (CI: use aws codebuild for job dist-arm-linux)
- rust-lang#140187 ([AIX] Handle AIX dynamic library extensions within c-link-to-rust-dylib run-make test)
- rust-lang#140196 (Improved diagnostics for non-primitive cast on non-primitive types (
Arc
,Option
)) - rust-lang#140210 (Work around cygwin issue on condvar timeout)
- rust-lang#140213 (mention about
x.py setup
inINSTALL.md
) - rust-lang#140229 (
DelimArgs
tweaks) - rust-lang#140248 (Fix impl block items indent)
r? @ghost
@rustbot
modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#137096 - ehuss:stabilize-doctest-xcompile, r=fmease
Stabilize flags for doctest cross compilation
This makes the following changes in preparation for supporting doctest cross-compiling in cargo:
- Renames
--runtool
and--runtool-arg
to--test-runtool
and--test-runtool-arg
to maintain consistency with other--test-*
arguments. - Stabilizes the
--test-runtool
and--test-runtool-arg
. These are needed in order to support cargo'starget.runner
option which specifies a runner to execute a cross-compiled doctest (for example, qemu). - Stabilizes the
--enable-per-target-ignores
flag by removing it and making it unconditionally enabled. This makes it possible to disable a doctest on a per-target basis, which I think will be helpful for rolling out this feature.
These changes were suggested in https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stabilizing.20doctest.20xcompile/near/409281127
The intent is to stabilize the doctest-xcompile feature in cargo. This will help ensure that for projects that do cross-compile testing that their doctests are also covered. Currently there is a somewhat surprising behavior that they are ignored.
Closes rust-lang#64245
try-job: x86_64-msvc-1
ehuss added a commit to ehuss/cargo that referenced this pull request
This updates the flags used for doctest xcompile to match the upstream changes in rust-lang/rust#137096 which renamed the flag.
ehuss added a commit to ehuss/cargo that referenced this pull request
This updates the flags used for doctest xcompile to match the upstream changes in rust-lang/rust#137096 which renamed and stabilized the flags.
ehuss mentioned this pull request
ehuss added a commit to ehuss/cargo that referenced this pull request
This updates the flags used for doctest xcompile to match the upstream changes in rust-lang/rust#137096 which renamed and stabilized the flags.
github-merge-queue bot pushed a commit to rust-lang/cargo that referenced this pull request
This updates the flags used for doctest xcompile to match the upstream changes in rust-lang/rust#137096 which renamed and stabilized the flags.
This cannot be merged until after nightly is published tonight.
ehuss mentioned this pull request
Labels
Area: port run-make Makefiles to rmake.rs
This issue / PR is in PFCP or FCP with a disposition to merge it.
The final comment period is finished for this PR / Issue.
This change is insta-stable, so needs a completed FCP to proceed.
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Announce this issue on triage meeting