You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b6c413b
Browse filesBrowse the repository at this point in the historyBrowse files
> If in step 5 you also bump `rules_rust` or the Rust toolchain used for building the extractor, those changes invalidate _all_ vendored files (including the
45
-
> Python ones under `misc/bazel/3rdparty/py_deps`), not just the tree-sitter ones. In that case run the umbrella script
46
-
> `misc/bazel/3rdparty/update_cargo_deps.sh` instead (it regenerates both `py_deps` and `tree_sitter_extractors_deps`, and runs
47
-
> `bazel mod tidy`), then commit all the regenerated files.
49
+
> If in step 5 you also bump `rules_rust` or the Rust toolchain used for
50
+
> building the extractor, those changes invalidate _all_ vendored files
51
+
> (including the Python ones under `misc/bazel/3rdparty/py_deps`), not just
52
+
> the tree-sitter ones. In that case run the umbrella script
53
+
> `misc/bazel/3rdparty/update_cargo_deps.sh` instead (it regenerates both
54
+
> `py_deps` and `tree_sitter_extractors_deps`, and runs `bazel mod tidy`),
55
+
> then commit all the regenerated files.
48
56
49
57
4. Run codegen
50
58
```
@@ -67,19 +75,28 @@ installing [`cargo-edit`](https://crates.io/crates/cargo-edit) with `cargo insta
67
75
bazel run //rust:install
68
76
```
69
77
* if it succeeds: good! You can move on to the next step.
70
-
* if it fails while compiling rust-analyzer dependencies, you need to update the Rust toolchain. Sometimes the error will tell you
71
-
so explicitly, but it may happen that the error is more obscure. To update the rust toolchain:
72
-
* you will need to open a PR on the internal repo updating `RUST_VERSION` in `MODULE.bazel`. In general you can have this merged
73
-
independently of the changes in `codeql`.
74
-
* in `codeql`, update both `RUST_VERSION` in `MODULE.bazel` _and_ `rust-toolchain.toml` files. You may want to also update the
75
-
nightly toolchain in `rust/extractor/src/nightly-toolchain/rust-toolchain.toml` to a more recent date while you're at it.
76
-
* a toolchain and/or `rules_rust` bump invalidates the vendored files, so re-run `misc/bazel/3rdparty/update_cargo_deps.sh`
77
-
(see the note in step 4) and commit the regenerated files.
78
-
* if it fails while compiling rust extractor code, you will need to adapt it to the new library version.
79
-
* for example updating annotations in `annotations.py`, adding / removing generated tests.
80
-
81
-
If you had to do any changes, commit them. If you updated the rust toolchain, running `rust/lint.py` might reformat or apply new
82
-
lints to the code.
78
+
* if it fails while compiling rust-analyzer dependencies, you need to update
79
+
the Rust toolchain. Sometimes the error will tell you so explicitly, but
80
+
it may happen that the error is more obscure. To update the rust
81
+
toolchain:
82
+
* you will need to open a PR on the internal repo updating `RUST_VERSION`
83
+
in `MODULE.bazel`. In general you can have this merged independently of
84
+
the changes in `codeql`.
85
+
* in `codeql`, update both `RUST_VERSION` in `MODULE.bazel` _and_
86
+
`rust-toolchain.toml` files. You may want to also update the nightly
87
+
toolchain in `rust/extractor/src/nightly-toolchain/rust-toolchain.toml`
88
+
to a more recent date while you're at it.
89
+
* a toolchain and/or `rules_rust` bump invalidates the vendored files, so
90
+
re-run `misc/bazel/3rdparty/update_cargo_deps.sh` (see the note in step
91
+
4) and commit the regenerated files.
92
+
* if it fails while compiling rust extractor code, you will need to adapt it
93
+
to the new library version.
94
+
* for example updating annotations in `annotations.py`, adding / removing
95
+
generated tests.
96
+
97
+
If you had to do any changes, commit them. If you updated the rust
98
+
toolchain, running `rust/lint.py` might reformat or apply new lints to the
0 commit comments