bevy/tools/ci/src/commands
Zachary Harrold a588ceeb49
Improve and Debug CI compile-check-no-std Command (#15935)
# Objective

- Fix bug where `cargo run -p ci` fails due to differing implementations
for default values between `Default` trait and `argh`
- Automatically install target via `rustup` to make first-run simpler.

## Solution

The command will now attempt to install the target via `rustup` by
default, which will provide a cleaner error message if a malformed
target is passed. It will also avoid confusion when people attempt to
use this tool for the first time without the target already installed.

I've added a flag, --skip-install, to disable the attempted installation
just-in-case. (e.g., maybe rustup isn't in their path but cargo is?).

Also fixed a bug where the default value for `target` was different
between the `Default` trait and `argh`, causing `cargo run -p ci` to
fail.

## Testing

- CI
- Subcommand ran directly

## Notes

This issue was originally discovered by @targrub (on Discord):

> Unfortunately, running `cargo run -p ci` still gives that same error
as I initially reported (though `cargo run -p ci --
compile-check-no-std` succeeds). This is after having run `rustup target
add x86_64-unknown-none`.
2024-10-15 23:45:23 +00:00
..
bench_check.rs Fix CI bench compile check (#14728) 2024-08-14 13:23:00 +00:00
clippy.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
compile_check_no_std.rs Improve and Debug CI compile-check-no-std Command (#15935) 2024-10-15 23:45:23 +00:00
compile_check.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
compile_fail.rs Move compile fail tests (#13196) 2024-05-03 13:35:21 +00:00
compile.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
doc_check.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
doc_test.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
doc.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
example_check.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
format.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
lints.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
mod.rs Add compile-check-no-std Command to CI Tool (#15843) 2024-10-11 10:54:44 +00:00
test_check.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00
test.rs Small changes to ci tool (#13137) 2024-04-30 00:54:14 +00:00