Skip to content

Use cargo xtask commands in the unsafe deep dive setup page - #3320

Open
ZainnQureshii wants to merge 1 commit into
google:mainfrom
ZainnQureshii:docs/unsafe-setup-xtask
Open

ZainnQureshii wants to merge 1 commit into
google:mainfrom
ZainnQureshii:docs/unsafe-setup-xtask

Conversation

@ZainnQureshii

Copy link
Copy Markdown

The "(Optional) Create a local instance of the course" block in the Unsafe deep dive setup page (src/unsafe-deep-dive/setup.md) uses cargo install-tools and cargo serve. Those cargo aliases were removed in #2847: .cargo/config.toml now defines only xtask, so both commands fail with "no such command".

Changes:

  • cargo install-tools -> cargo xtask install-tools
  • cargo serve -> cargo xtask serve

These match the README's Setup and Commands sections (README.md:75, README.md:87-88) and the InstallTools and Serve subcommands in xtask/src/main.rs.

  • One sentence pointing to the README's Setup prerequisites. install-tools runs bazel build (xtask/src/main.rs:153), and this page's own Bazel note is inside an HTML comment, so a learner without Bazel would still fail at that step.

Ran in a clone of main (stable Rust):

$ cargo install-tools
error: no such command: `install-tools`
$ cargo serve
error: no such command: `serve`
$ cargo xtask --help
  ...
  install-tools      Installs the tools the project depends on
  ...
  serve              Starts a web server with the course

dprint check passes on the page. The full install-tools and serve runs (Bazel build) were not done.

Prepared with AI assistance (Claude Code) and reviewed with GitHub Copilot.

🤖 Generated with Claude Code

google#2847 removed the `install-tools` and `serve` cargo aliases, so
`cargo install-tools` and `cargo serve` on this page now fail with
"no such command". Use `cargo xtask install-tools` and `cargo xtask serve`,
as the README does, and point to the README's setup prerequisites,
since `install-tools` runs Bazel.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the setup instructions in src/unsafe-deep-dive/setup.md to correctly use 'cargo xtask install-tools' and 'cargo xtask serve' instead of 'cargo install-tools' and 'cargo serve'. It also adds a note indicating that 'cargo xtask install-tools' requires the prerequisites listed in the repository's README, including Bazel. I have no feedback to provide.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant