merged doctests: regressions due to examining process arguments · Issue #130796 · rust-lang/rust (original) (raw)
The crater run for merged doctests (#130285) detected a large number of regressions due to tests examining the process arguments. (I don't have an exact number, but let's say ~50 projects.)
Previously, there were no arguments, but now it gets arguments like *doctest-inner-test 0
which the user's CLI parsing code isn't expecting.
For example, using something like StructOpt::from_args will now fail.
It seems to be fairly common to have objects whose default constructor will parse the arguments from the command line.
I'm not sure if or how we should resolve that. One idea is to use a different mechanism for passing in the test information (like via an environment variable).
Meta
rustc 1.83.0-nightly (da889684c 2024-09-20)
binary: rustc
commit-hash: da889684c80508036ff036db8c159ffdcf27648a
commit-date: 2024-09-20
host: aarch64-apple-darwin
release: 1.83.0-nightly
LLVM version: 19.1.0