Closed ehuss closed 1 month ago
Deprecation: the legacy temporary assignment syntax is deprecated; use "tmp" instead
This was deprecated in 0.18 which is also when tmp
was added. That is annoying for people installing from distributions as my distribution is still on 0.17.
The tests were added in #14493 for #14520. As our current completions do not have tests, not having tests for these new completions is on-par. As discussed in https://github.com/rust-lang/cargo/pull/14493#pullrequestreview-2280762279, the primary focus for the tests that call shells is to make sure the integration of clap_complete
into cargo works. For everything else, we should either test the functionality directly, without a shell, or delegate the testing to clap_complete
.
This could mean we drop the number of shells we verify in CI. If one works, they should all work. That could speed things up, reduce demand for custom tools, and possibly we can pick one that does a good job of threading the different failure cases.
To add to that, we also started this experiment with enabling all shells clap_complete
supports. We can easily narrow those down to parity or maybe a step above parity. We have that being tracked in #14520
Problem
The new shell_completions tests have a few issues that need to be resolved before they can be enabled.
fish
andzsh
randomly fail. https://github.com/rust-lang/cargo/pull/14541#issuecomment-2351096767 indicates that it might be an interactive timeout.bash
test also requires the bash-completions package to be installed.ignore
attribute so that it reports in the output when it isn't running. Currently they exit withreturn;
on macos, but that should use theignore
attribute instead.Steps
cargo test --test testsuite -- shell_completions
Possible Solution(s)
One idea I had for limiting where these tests run is to add a CI_EXTENDED environment variable. The tests would only be required to run if that environment variable is set, and then we can set that in the appropriate jobs (like
test
). Then the cargo_test macro could have something likerequires_extended_fish
or something like that. That would also be useful for the currently hard-codedhg
andlldb
.However, that doesn't help with some of the more complex issues like the bash-completions problem.
We could extend the cargo_test attribute to have
ignore_macos
to fix the macos ignore problem.Notes
No response
Version
Currently on 643a025b3c3ad6f7d3acea558d223784ea8ab932 of master.