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.
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).
I vaguely remember that using environment variables was discussed but can't find anything except mentioning it here. Maybe it'd be a better approach indeed. Let me send a PR so we can make a crater run on it.
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