Closed
Description
By convention, users would expect to type in --no-capture
. The fact that the argument is --nocapture
trips people up, especially as they have to wait for their test to compile before they see the failure. Without spelling suggestions, they need to then consult the help to then remember its without the middle -
. Unless someone is doing this all the time to build up muscle memory to counteract intuition, this will trip people up each time.
See also
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity
epage commentedon Nov 15, 2024
I propose we audit libtest's CLI for
And propose we adjust CLI parameters to meet user expectations. By "adust" I mean that we make new parameters that are aliases for the existing parameters, and deprecate the existing parameters by hiding them in help and providing a deprecation message.
As T-testing-devex is considering first-class custom test harnesses which will be expected to follow libtest's "API", the sooner we nail this down, the more likely they won't need to deal with supporting the deprecated API.
#24451 (comment)
If we had made this change in 2015, the community migration cost would have been small. Its larger now but the longer we wait, the larger it becomes. I'm more worried about existing users having problems with this and the large number of potential new users.
epage commentedon Nov 15, 2024
For casing, the two that are questionable are
--logfile
which T-testing-devex has an FCP for deprecating, see Export machine-readable test results to a file testing-devex-team#9--nocapture
(I just put the middle-
in...)For consistency with the rest of Rust tools
--test-threads
: Cargo commands refer to this as-j --jobs
For consistency with pytest
--no-capture
is instead--capture=no
with a short flag of-s
fd|sys|no|tee-sys
For inspiration from cargo-nextest
--ignored
,--include-ignored
:--run-ignored <default|only|all>
--test-threads
:-j --thread-threads
If people have other test runners they want to compare, you are welcome to add them! I'm scoping this to the existing, stable features of libtest.
jieyouxu commentedon Nov 15, 2024
epage commentedon Nov 15, 2024
My hope is that we can close out the discussion quickly enough that we don't need to split it up. We'll likely need to do an FCP anyways for
--nocapture
, so might as well look at it holistically.jieyouxu commentedon Nov 15, 2024
epage commentedon Nov 15, 2024
Hmm, I see why you brought up a tracking issue. My focus on this is purely in naming and not in improving the semantics. My expectation is that we'll be moving filtering into Cargo and re-evaluate the interface then. Moving more logic into Cargo will be unblocked by the json format being stabilized (so Cargo communicates through tests through json) and this will reduce the burden of what custom test harnesses need to implement.
jieyouxu commentedon Nov 15, 2024
sminez commentedon Nov 15, 2024
Is this something that would be possible to pick up once the details are finalised? I'd be interested in taking a look if it was.
epage commentedon Nov 15, 2024
From Zulip
36 remaining items