@@ -165,16 +165,17 @@ to `.vscode/settings.json` in your local Miri clone:
165
165
{
166
166
"rust-analyzer.rustc.source" : " discover" ,
167
167
"rust-analyzer.linkedProjects" : [
168
- " ./Cargo.toml" ,
169
- " ./cargo-miri/Cargo.toml"
168
+ " Cargo.toml" ,
169
+ " cargo-miri/Cargo.toml" ,
170
+ " miri-script/Cargo.toml" ,
170
171
],
171
- "rust-analyzer.checkOnSave .overrideCommand" : [
172
+ "rust-analyzer.check .overrideCommand" : [
172
173
" env" ,
173
174
" MIRI_AUTO_OPS=no" ,
174
175
" ./miri" ,
175
176
" cargo" ,
176
177
" clippy" , // make this `check` when working with a locally built rustc
177
- " --message-format=json"
178
+ " --message-format=json" ,
178
179
],
179
180
// Contrary to what the name suggests, this also affects proc macros.
180
181
"rust-analyzer.cargo.buildScripts.overrideCommand" : [
@@ -230,25 +231,16 @@ You can also directly run Miri on a Rust source file:
230
231
## Advanced topic: Syncing with the rustc repo
231
232
232
233
We use the [ ` josh ` proxy] ( https://github.com/josh-project/josh ) to transmit changes between the
233
- rustc and Miri repositories.
234
+ rustc and Miri repositories. You can install it as follows:
234
235
235
236
``` sh
236
237
cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06
237
- josh-proxy --local=$HOME /.cache/josh --remote=https://github.com --no-background
238
238
```
239
239
240
- This uses a directory ` $HOME/.cache/josh ` as a cache, to speed up repeated pulling/pushing.
241
-
242
- To make josh push via ssh instead of https, you can add the following to your ` .gitconfig ` :
243
-
244
- ``` toml
245
- [url "git@github .com:" ]
246
- pushInsteadOf = https://github.com/
247
- ```
240
+ Josh will automatically be started and stopped by ` ./miri ` .
248
241
249
242
### Importing changes from the rustc repo
250
243
251
- Josh needs to be running, as described above.
252
244
We assume we start on an up-to-date master branch in the Miri repo.
253
245
254
246
``` sh
@@ -267,16 +259,14 @@ needed.
267
259
268
260
### Exporting changes to the rustc repo
269
261
270
- Keep in mind that pushing is the most complicated job that josh has to do --
271
- pulling just filters the rustc history, but pushing needs to construct a new
272
- rustc history that would filter to the given Miri history! To avoid problems, it
273
- is a good idea to always pull immediately before you push. In particular, you
274
- should never do two josh pushes without an intermediate pull; that can lead to
275
- duplicated commits.
262
+ Keep in mind that pushing is the most complicated job that josh has to do -- pulling just filters
263
+ the rustc history, but pushing needs to construct a new rustc history that would filter to the given
264
+ Miri history! To avoid problems, it is a good idea to always pull immediately before you push. If
265
+ you are getting strange errors, chances are you are running into [ this josh
266
+ bug] ( https://github.com/josh-project/josh/issues/998 ) . In that case, please get in touch on Zulip.
276
267
277
- Josh needs to be running, as described above. We will use the josh proxy to push
278
- to your fork of rustc. Run the following in the Miri repo, assuming we are on an
279
- up-to-date master branch:
268
+ We will use the josh proxy to push to your fork of rustc. Run the following in the Miri repo,
269
+ assuming we are on an up-to-date master branch:
280
270
281
271
``` sh
282
272
# Push the Miri changes to your rustc fork (substitute your github handle for YOUR_NAME).
@@ -286,3 +276,11 @@ up-to-date master branch:
286
276
This will create a new branch called 'miri' in your fork, and the output should
287
277
include a link to create a rustc PR that will integrate those changes into the
288
278
main repository.
279
+
280
+ If this fails due to authentication problems, it can help to make josh push via ssh instead of
281
+ https. Add the following to your ` .gitconfig ` :
282
+
283
+ ``` toml
284
+ [url "git@github .com:" ]
285
+ pushInsteadOf = https://github.com/
286
+ ```
0 commit comments