Skip to content

Commit ebf4448

Browse files
committed
Fix remaining references to cargo xtask codegen
1 parent c0e9530 commit ebf4448

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

crates/parser/src/grammar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! // fn foo() {}
1919
//! ```
2020
//!
21-
//! After adding a new inline-test, run `cargo xtask codegen` to
21+
//! After adding a new inline-test, run `cargo test -p xtask` to
2222
//! extract it as a standalone text-fixture into
2323
//! `crates/syntax/test_data/parser/`, and run `cargo test` once to
2424
//! create the "gold" value.

docs/dev/architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,21 @@ See [RFC](https://github.com/rust-lang/rfcs/pull/2256) and [./syntax.md](./synta
9797

9898
- [rowan](https://github.com/rust-analyzer/rowan) library is used for constructing syntax trees.
9999
- `ast` provides a type safe API on top of the raw `rowan` tree.
100-
- `ungrammar` description of the grammar, which is used to generate `syntax_kinds` and `ast` modules, using `cargo xtask codegen` command.
100+
- `ungrammar` description of the grammar, which is used to generate `syntax_kinds` and `ast` modules, using `cargo test -p xtask` command.
101101

102102
Tests for ra_syntax are mostly data-driven.
103103
`test_data/parser` contains subdirectories with a bunch of `.rs` (test vectors) and `.txt` files with corresponding syntax trees.
104104
During testing, we check `.rs` against `.txt`.
105105
If the `.txt` file is missing, it is created (this is how you update tests).
106-
Additionally, running `cargo xtask codegen` will walk the grammar module and collect all `// test test_name` comments into files inside `test_data/parser/inline` directory.
106+
Additionally, running the xtask test suite with `cargo test -p xtask` will walk the grammar module and collect all `// test test_name` comments into files inside `test_data/parser/inline` directory.
107107

108108
To update test data, run with `UPDATE_EXPECT` variable:
109109

110110
```bash
111111
env UPDATE_EXPECT=1 cargo qt
112112
```
113113

114-
After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above.
114+
After adding a new inline test you need to run `cargo test -p xtask` and also update the test data as described above.
115115

116116
Note [`api_walkthrough`](https://github.com/rust-analyzer/rust-analyzer/blob/2fb6af89eb794f775de60b82afe56b6f986c2a40/crates/ra_syntax/src/lib.rs#L190-L348)
117117
in particular: it shows off various methods of working with syntax tree.

docs/user/manual.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The LSP allows various code editors, like VS Code, Emacs or Vim, to implement se
1919
To improve this document, send a pull request: +
2020
https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/manual.adoc[https://github.com/rust-analyzer/.../manual.adoc]
2121
22-
The manual is written in https://asciidoc.org[AsciiDoc] and includes some extra files which are generated from the source code. Run `cargo test` and `cargo xtask codegen` to create these and then `asciidoctor manual.adoc` to create an HTML copy.
22+
The manual is written in https://asciidoc.org[AsciiDoc] and includes some extra files which are generated from the source code. Run `cargo test` and `cargo test -p xtask` to create these and then `asciidoctor manual.adoc` to create an HTML copy.
2323
2424
====
2525

xtask/src/codegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub(crate) fn ensure_file_contents(file: &Path, contents: &str) -> Result<()> {
6262
let _ = std::fs::create_dir_all(parent);
6363
}
6464
std::fs::write(file, contents).unwrap();
65-
anyhow::bail!("some file were not up to date")
65+
anyhow::bail!("some file was not up to date and has been updated, simply re-run the tests")
6666
}
6767

6868
fn normalize_newlines(s: &str) -> String {

xtask/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! See https://github.com/matklad/cargo-xtask/.
22
//!
33
//! This binary defines various auxiliary build commands, which are not
4-
//! expressible with just `cargo`. Notably, it provides `cargo xtask codegen`
4+
//! expressible with just `cargo`. Notably, it provides tests via `cargo test -p xtask`
55
//! for code generation and `cargo xtask install` for installation of
66
//! rust-analyzer server and client.
77
//!

0 commit comments

Comments
 (0)