Skip to content

Commit e9493d6

Browse files
committed
Auto merge of #104456 - RalfJung:miri, r=RalfJung
update Miri Not a huge sync, but there was a conflict and [josh](https://github.com/josh-project/josh/) seems to prefer those to be merged back ASAP.
2 parents e69336e + 157b2d5 commit e9493d6

File tree

22 files changed

+347
-374
lines changed

22 files changed

+347
-374
lines changed

Cargo.lock

+39-39
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,18 @@ dependencies = [
214214
"regex-automata",
215215
]
216216

217+
[[package]]
218+
name = "bstr"
219+
version = "1.0.1"
220+
source = "registry+https://github.com/rust-lang/crates.io-index"
221+
checksum = "fca0852af221f458706eb0725c03e4ed6c46af9ac98e6a689d5e634215d594dd"
222+
dependencies = [
223+
"memchr",
224+
"once_cell",
225+
"regex-automata",
226+
"serde",
227+
]
228+
217229
[[package]]
218230
name = "build-manifest"
219231
version = "0.1.0"
@@ -919,25 +931,11 @@ dependencies = [
919931
"cfg-if 1.0.0",
920932
]
921933

922-
[[package]]
923-
name = "crossbeam"
924-
version = "0.8.1"
925-
source = "registry+https://github.com/rust-lang/crates.io-index"
926-
checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845"
927-
dependencies = [
928-
"cfg-if 1.0.0",
929-
"crossbeam-channel",
930-
"crossbeam-deque",
931-
"crossbeam-epoch",
932-
"crossbeam-queue",
933-
"crossbeam-utils",
934-
]
935-
936934
[[package]]
937935
name = "crossbeam-channel"
938-
version = "0.5.4"
936+
version = "0.5.6"
939937
source = "registry+https://github.com/rust-lang/crates.io-index"
940-
checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
938+
checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
941939
dependencies = [
942940
"cfg-if 1.0.0",
943941
"crossbeam-utils",
@@ -967,16 +965,6 @@ dependencies = [
967965
"scopeguard",
968966
]
969967

970-
[[package]]
971-
name = "crossbeam-queue"
972-
version = "0.3.5"
973-
source = "registry+https://github.com/rust-lang/crates.io-index"
974-
checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2"
975-
dependencies = [
976-
"cfg-if 1.0.0",
977-
"crossbeam-utils",
978-
]
979-
980968
[[package]]
981969
name = "crossbeam-utils"
982970
version = "0.8.8"
@@ -1260,6 +1248,15 @@ version = "0.2.0"
12601248
source = "registry+https://github.com/rust-lang/crates.io-index"
12611249
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
12621250

1251+
[[package]]
1252+
name = "fastrand"
1253+
version = "1.8.0"
1254+
source = "registry+https://github.com/rust-lang/crates.io-index"
1255+
checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
1256+
dependencies = [
1257+
"instant",
1258+
]
1259+
12631260
[[package]]
12641261
name = "filetime"
12651262
version = "0.2.14"
@@ -1584,7 +1581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
15841581
checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a"
15851582
dependencies = [
15861583
"aho-corasick",
1587-
"bstr",
1584+
"bstr 0.2.17",
15881585
"fnv",
15891586
"log",
15901587
"regex",
@@ -2341,17 +2338,17 @@ dependencies = [
23412338

23422339
[[package]]
23432340
name = "once_cell"
2344-
version = "1.12.0"
2341+
version = "1.16.0"
23452342
source = "registry+https://github.com/rust-lang/crates.io-index"
2346-
checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
2343+
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
23472344

23482345
[[package]]
23492346
name = "opener"
23502347
version = "0.5.0"
23512348
source = "registry+https://github.com/rust-lang/crates.io-index"
23522349
checksum = "4ea3ebcd72a54701f56345f16785a6d3ac2df7e986d273eb4395c0b01db17952"
23532350
dependencies = [
2354-
"bstr",
2351+
"bstr 0.2.17",
23552352
"winapi",
23562353
]
23572354

@@ -3008,9 +3005,9 @@ dependencies = [
30083005

30093006
[[package]]
30103007
name = "rustc-build-sysroot"
3011-
version = "0.3.3"
3008+
version = "0.4.0"
30123009
source = "registry+https://github.com/rust-lang/crates.io-index"
3013-
checksum = "ec5f3689b6c560d6a3a17fcbe54204cd870b4fcf46342d60de16715b660d2c92"
3010+
checksum = "20c4b4625eeb148cccf82d5e9b90ad7fab3b11a0204cf75cc7fa04981a0fdffd"
30143011
dependencies = [
30153012
"anyhow",
30163013
"rustc_version",
@@ -3098,9 +3095,10 @@ dependencies = [
30983095
name = "rustc-workspace-hack"
30993096
version = "1.0.0"
31003097
dependencies = [
3101-
"bstr",
3098+
"bstr 0.2.17",
31023099
"clap 3.2.20",
31033100
"libz-sys",
3101+
"rand 0.8.5",
31043102
"regex",
31053103
"serde_json",
31063104
"syn",
@@ -4767,13 +4765,13 @@ dependencies = [
47674765

47684766
[[package]]
47694767
name = "tempfile"
4770-
version = "3.2.0"
4768+
version = "3.3.0"
47714769
source = "registry+https://github.com/rust-lang/crates.io-index"
4772-
checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
4770+
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
47734771
dependencies = [
47744772
"cfg-if 1.0.0",
4773+
"fastrand",
47754774
"libc",
4776-
"rand 0.8.5",
47774775
"redox_syscall",
47784776
"remove_dir_all",
47794777
"winapi",
@@ -5119,20 +5117,22 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
51195117

51205118
[[package]]
51215119
name = "ui_test"
5122-
version = "0.3.1"
5120+
version = "0.4.0"
51235121
source = "registry+https://github.com/rust-lang/crates.io-index"
5124-
checksum = "7d1f546a5883ae78da735bba529ec1116661e2f73582f23920d994dc97da3a22"
5122+
checksum = "bf4559da3fe6b481f8674a29379677cb9606cd6f75fc254a2c9834c55638503d"
51255123
dependencies = [
5124+
"bstr 1.0.1",
51265125
"cargo_metadata 0.15.0",
51275126
"color-eyre",
51285127
"colored",
5129-
"crossbeam",
5128+
"crossbeam-channel",
51305129
"diff",
51315130
"lazy_static",
51325131
"regex",
51335132
"rustc_version",
51345133
"serde",
51355134
"serde_json",
5135+
"tempfile",
51365136
]
51375137

51385138
[[package]]

src/tools/miri/.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ jobs:
6767
shell: bash
6868
run: |
6969
if [[ ${{ github.event_name }} == 'schedule' ]]; then
70-
./miri toolchain HEAD --host ${{ matrix.host_target }}
71-
else
72-
./miri toolchain "" --host ${{ matrix.host_target }}
70+
echo "Building against latest rustc git version"
71+
git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1 > rust-version
7372
fi
73+
./miri toolchain --host ${{ matrix.host_target }}
7474
7575
- name: Show Rust version
7676
run: |

src/tools/miri/CONTRIBUTING.md

+9-24
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ is set the `MIRI_LIB_SRC` environment variable to the `library` folder of a
150150
`rust-lang/rust` repository checkout. Note that changing files in that directory
151151
does not automatically trigger a re-build of the standard library; you have to
152152
clear the Miri build cache manually (on Linux, `rm -rf ~/.cache/miri`;
153-
and on Windows, `rmdir /S "%LOCALAPPDATA%\rust-lang\miri\cache"`).
153+
on Windows, `rmdir /S "%LOCALAPPDATA%\rust-lang\miri\cache"`;
154+
and on macOS, `rm -rf ~/Library/Caches/org.rust-lang.miri`).
154155

155156
### Benchmarking
156157

@@ -208,23 +209,6 @@ We described above the simplest way to get a working build environment for Miri,
208209
which is to use the version of rustc indicated by `rustc-version`. But
209210
sometimes, that is not enough.
210211

211-
### Updating `rustc-version`
212-
213-
The `rustc-version` file is regularly updated to keep Miri close to the latest
214-
version of rustc. Usually, new contributors do not have to worry about this. But
215-
sometimes a newer rustc is needed for a patch, and sometimes Miri needs fixing
216-
for changes in rustc. In both cases, `rustc-version` needs updating.
217-
218-
To update the `rustc-version` file and install the latest rustc, you can run:
219-
```
220-
./miri toolchain HEAD
221-
```
222-
223-
Now edit Miri until `./miri test` passes, and submit a PR. Generally, it is
224-
preferred to separate updating `rustc-version` and doing what it takes to get
225-
Miri working again, from implementing new features that rely on the updated
226-
rustc. This avoids blocking all Miri development on landing a big PR.
227-
228212
### Building Miri with a locally built rustc
229213

230214
[building Miri with a locally built rustc]: #building-miri-with-a-locally-built-rustc
@@ -282,13 +266,13 @@ With this, you should now have a working development setup! See
282266
## Advanced topic: Syncing with the rustc repo
283267

284268
We use the [`josh` proxy](https://github.com/josh-project/josh) to transmit
285-
changes between the rustc and Miri repositories. For now, a fork of josh needs to be built
286-
from source. This downloads and runs josh:
269+
changes between the rustc and Miri repositories. For now, the latest git version
270+
of josh needs to be built from source. This downloads and runs josh:
287271

288272
```sh
289-
git clone https://github.com/RalfJung/josh
273+
git clone https://github.com/josh-project/josh
290274
cd josh
291-
cargo run --release -p josh-proxy -- --local=$(pwd)/local --remote=https://github.com --no-background
275+
cargo run --release -p josh-proxy -- --local=local --remote=https://github.com --no-background
292276
```
293277

294278
### Importing changes from the rustc repo
@@ -298,9 +282,10 @@ We assume we start on an up-to-date master branch in the Miri repo.
298282

299283
```sh
300284
# Fetch and merge rustc side of the history. Takes ca 5 min the first time.
285+
# This will also update the 'rustc-version' file.
301286
./miri rustc-pull
302-
# Update toolchain reference and apply formatting.
303-
./miri toolchain HEAD && ./miri fmt
287+
# Update local toolchain and apply formatting.
288+
./miri toolchain && ./miri fmt
304289
git commit -am "rustup"
305290
```
306291

0 commit comments

Comments
 (0)