Skip to content

Commit 6bf5983

Browse files
committed
Rust: Improve the rust-analyzer update instructions
In particular, add additional steps about re-generating `.expected` files and fixing problems exposed by doing that.
1 parent d44c5ff commit 6bf5983

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

‎rust/updating-rust-analyzer.md‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,34 @@ pkg-config`.
107107
toolchain, running `rust/lint.py` might reformat or apply new lints to the
108108
code.
109109
110-
7. Check with CI if everything is in order.
110+
7. Update `.expected` files by running:
111+
```
112+
codeql test run --learn --search-path=rust/extractor-pack:. rust/ql/test
113+
```
114+
The search path selects the newly built extractor from step 6.
115+
116+
If there are changes, commit the updated expectations:
117+
```
118+
git add 'rust/ql/test/**/*.expected'
119+
git commit -m 'Rust: Update test expectations'
120+
```
111121
112-
8. Run DCA with database caching disabled. Iterate on the code if needed.
122+
8. Check the `.expected` files for `testFailures` and fix the underlying
123+
problems.
124+
125+
For each separate problem address the issue, regenerate the `.expected`
126+
files with the command from step 7, and create a commit.
127+
128+
Repeat until no `testFailures` remain and the tests pass.
113129
114130
9. If in step 5 the schema was updated, add upgrade/downgrade scripts and a
115131
change note. This is best done last to reduce the chance of merge conflicts
116132
(none of the other testing depends on having upgrade and downgrade scripts
117133
in place). See [Upgrading a language database
118134
schema](docs/prepare-db-upgrade.md).
135+
136+
10. Create a PR with the changes thus far.
137+
138+
11. Check with CI if everything is in order.
139+
140+
12. Run DCA with database caching disabled. Iterate on the code if needed.

0 commit comments

Comments
 (0)