Skip to content

Commit cd0dcd0

Browse files
docs: Update AGENTS.md to mandate 'yes | ./cargo.sh' (#2799)
* docs: Update AGENTS.md to mandate 'yes | ./cargo.sh' The `./cargo.sh` wrapper (via `cargo-zerocopy`) interactively prompts the user to install missing toolchains or components (e.g., `rust-src`). This interactivity causes agents to hang or fail (e.g., panic on unexpected EOF). This change updates `AGENTS.md` to strictly require the usage of `yes | ./cargo.sh` for all operations, ensuring that toolchain installations are auto-confirmed in non-interactive environments. All code examples and the syntax definition have been updated to reflect this requirement. * docs: Update AGENTS.md to mandate 'yes | ./cargo.sh' and reference fmt script Updates `AGENTS.md` to: 1. Strictly require the usage of `yes | ./cargo.sh` for all operations to bypass interactive toolchain installation prompts. 2. Instruct agents to read `ci/check_fmt.sh` to determine how to format code. All code examples and the syntax definition have been updated to reflect the `yes |` requirement. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent ddcf94c commit cd0dcd0

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

AGENTS.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ This repository uses a wrapper script around Cargo to ensure consistent toolchai
44

55
## Build and Test
66

7-
**IMPORTANT:** You must **NEVER** run `cargo` directly. Instead, you must **ALWAYS** use the `./cargo.sh` wrapper script for all `cargo` sub-commands (e.g., `check`, `test`, `build`).
7+
**IMPORTANT:** You must **NEVER** run `cargo` directly. Instead, you must **ALWAYS** use `yes | ./cargo.sh` for all `cargo` sub-commands (e.g., `check`, `test`, `build`). Using `yes |` is required to bypass interactive prompts for toolchain installation.
88

99
### Syntax
10-
`./cargo.sh +<toolchain> <command> [args]`
10+
`yes | ./cargo.sh +<toolchain> <command> [args]`
1111

1212
### Toolchains
1313
The `<toolchain>` argument is mandatory and can be one of the following:
@@ -23,23 +23,23 @@ The `<toolchain>` argument is mandatory and can be one of the following:
2323
Clippy should **always** be run on the `nightly` toolchain.
2424

2525
```bash
26-
./cargo.sh +nightly clippy
27-
./cargo.sh +nightly clippy --tests
26+
yes | ./cargo.sh +nightly clippy
27+
yes | ./cargo.sh +nightly clippy --tests
2828
```
2929

3030
### Examples
3131

3232
```bash
3333
# Check the code using the nightly toolchain
3434
# DO NOT RUN: cargo check
35-
./cargo.sh +nightly check
35+
yes | ./cargo.sh +nightly check
3636

3737
# Run tests on all supported toolchains
3838
# DO NOT RUN: cargo test
39-
./cargo.sh +all test
39+
yes | ./cargo.sh +all test
4040

4141
# Run a specific test on stable
42-
./cargo.sh +stable test -- test_name
42+
yes | ./cargo.sh +stable test -- test_name
4343
```
4444

4545
## Workflow
@@ -76,6 +76,10 @@ When a PR makes progress on, but does not close, an issue, the PR description an
7676

7777
## Code Style
7878

79+
### Formatting
80+
81+
To determine how to format code, read the formatting checker script in `ci/check_fmt.sh`.
82+
7983
### Comments
8084

8185
All comments (including `//`, `///`, and `//!`) should be wrapped at 80 columns.

0 commit comments

Comments
 (0)