Skip to content

Commit

Permalink
Auto merge of rust-lang#115095 - RalfJung:miri, r=RalfJung
Browse files Browse the repository at this point in the history
update Miri

r? `@ghost`
  • Loading branch information
bors committed Aug 22, 2023
2 parents b2e9d73 + 47ba2a9 commit d8c69df
Show file tree
Hide file tree
Showing 22 changed files with 326 additions and 100 deletions.
53 changes: 27 additions & 26 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -500,7 +500,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand All @@ -525,7 +525,7 @@ dependencies = [
"regex",
"rustc_tools_util",
"serde",
"syn 2.0.27",
"syn 2.0.29",
"tempfile",
"termize",
"tester",
Expand Down Expand Up @@ -849,7 +849,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand All @@ -860,7 +860,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
dependencies = [
"darling_core",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand All @@ -875,7 +875,7 @@ version = "0.1.73"
dependencies = [
"itertools",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -911,7 +911,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -988,7 +988,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -1354,7 +1354,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -2334,6 +2334,7 @@ dependencies = [
"rand",
"regex",
"rustc_version",
"serde",
"smallvec",
"ui_test",
]
Expand Down Expand Up @@ -2503,7 +2504,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -2691,7 +2692,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -3636,7 +3637,7 @@ dependencies = [
"fluent-syntax",
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
"unic-langid",
]

Expand Down Expand Up @@ -3906,7 +3907,7 @@ version = "0.1.0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
"synstructure 0.13.0",
]

Expand Down Expand Up @@ -4514,7 +4515,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -4666,22 +4667,22 @@ dependencies = [

[[package]]
name = "serde"
version = "1.0.164"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d"
checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31"
dependencies = [
"serde_derive",
]

[[package]]
name = "serde_derive"
version = "1.0.164"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68"
checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -4962,9 +4963,9 @@ dependencies = [

[[package]]
name = "syn"
version = "2.0.27"
version = "2.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0"
checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -4991,7 +4992,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
"unicode-xid",
]

Expand Down Expand Up @@ -5161,7 +5162,7 @@ checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -5382,7 +5383,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
]

[[package]]
Expand Down Expand Up @@ -5777,7 +5778,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
"wasm-bindgen-shared",
]

Expand Down Expand Up @@ -5811,7 +5812,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.27",
"syn 2.0.29",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
Expand Down
2 changes: 0 additions & 2 deletions src/tools/miri/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ jobs:
fetch-depth: 256 # get a bit more of the history
- name: install josh-proxy
run: cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06
- name: start josh-proxy
run: josh-proxy --local=$HOME/.cache/josh --remote=https://github.com --no-background &
- name: setup bot git name and email
run: |
git config --global user.name 'The Miri Conjob Bot'
Expand Down
46 changes: 22 additions & 24 deletions src/tools/miri/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,17 @@ to `.vscode/settings.json` in your local Miri clone:
{
"rust-analyzer.rustc.source": "discover",
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
"./cargo-miri/Cargo.toml"
"Cargo.toml",
"cargo-miri/Cargo.toml",
"miri-script/Cargo.toml",
],
"rust-analyzer.checkOnSave.overrideCommand": [
"rust-analyzer.check.overrideCommand": [
"env",
"MIRI_AUTO_OPS=no",
"./miri",
"cargo",
"clippy", // make this `check` when working with a locally built rustc
"--message-format=json"
"--message-format=json",
],
// Contrary to what the name suggests, this also affects proc macros.
"rust-analyzer.cargo.buildScripts.overrideCommand": [
Expand Down Expand Up @@ -230,25 +231,16 @@ You can also directly run Miri on a Rust source file:
## Advanced topic: Syncing with the rustc repo

We use the [`josh` proxy](https://github.com/josh-project/josh) to transmit changes between the
rustc and Miri repositories.
rustc and Miri repositories. You can install it as follows:

```sh
cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r22.12.06
josh-proxy --local=$HOME/.cache/josh --remote=https://github.com --no-background
```

This uses a directory `$HOME/.cache/josh` as a cache, to speed up repeated pulling/pushing.

To make josh push via ssh instead of https, you can add the following to your `.gitconfig`:

```toml
[url "git@github.com:"]
pushInsteadOf = https://github.com/
```
Josh will automatically be started and stopped by `./miri`.

### Importing changes from the rustc repo

Josh needs to be running, as described above.
We assume we start on an up-to-date master branch in the Miri repo.

```sh
Expand All @@ -267,16 +259,14 @@ needed.

### Exporting changes to the rustc repo

Keep in mind that pushing is the most complicated job that josh has to do --
pulling just filters the rustc history, but pushing needs to construct a new
rustc history that would filter to the given Miri history! To avoid problems, it
is a good idea to always pull immediately before you push. In particular, you
should never do two josh pushes without an intermediate pull; that can lead to
duplicated commits.
Keep in mind that pushing is the most complicated job that josh has to do -- pulling just filters
the rustc history, but pushing needs to construct a new rustc history that would filter to the given
Miri history! To avoid problems, it is a good idea to always pull immediately before you push. If
you are getting strange errors, chances are you are running into [this josh
bug](https://github.com/josh-project/josh/issues/998). In that case, please get in touch on Zulip.

Josh needs to be running, as described above. We will use the josh proxy to push
to your fork of rustc. Run the following in the Miri repo, assuming we are on an
up-to-date master branch:
We will use the josh proxy to push to your fork of rustc. Run the following in the Miri repo,
assuming we are on an up-to-date master branch:

```sh
# Push the Miri changes to your rustc fork (substitute your github handle for YOUR_NAME).
Expand All @@ -286,3 +276,11 @@ up-to-date master branch:
This will create a new branch called 'miri' in your fork, and the output should
include a link to create a rustc PR that will integrate those changes into the
main repository.

If this fails due to authentication problems, it can help to make josh push via ssh instead of
https. Add the following to your `.gitconfig`:

```toml
[url "git@github.com:"]
pushInsteadOf = https://github.com/
```
21 changes: 11 additions & 10 deletions src/tools/miri/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ dependencies = [
"rand",
"regex",
"rustc_version",
"serde",
"smallvec",
"ui_test",
]
Expand Down Expand Up @@ -528,18 +529,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"

[[package]]
name = "proc-macro2"
version = "1.0.60"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
dependencies = [
"unicode-ident",
]

[[package]]
name = "quote"
version = "1.0.26"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
"proc-macro2",
]
Expand Down Expand Up @@ -685,18 +686,18 @@ dependencies = [

[[package]]
name = "serde"
version = "1.0.162"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6"
checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31"
dependencies = [
"serde_derive",
]

[[package]]
name = "serde_derive"
version = "1.0.162"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6"
checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec"
dependencies = [
"proc-macro2",
"quote",
Expand Down Expand Up @@ -737,9 +738,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"

[[package]]
name = "syn"
version = "2.0.15"
version = "2.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
dependencies = [
"proc-macro2",
"quote",
Expand Down
2 changes: 2 additions & 0 deletions src/tools/miri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ rustc_version = "0.4"
# Features chosen to match those required by env_logger, to avoid rebuilds
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
lazy_static = "1.4.0"
# Require a version of serde without intransparent unreproducible binary blobs.
serde = { version = "1.0.185", features = ["derive"] }

[package.metadata.rust-analyzer]
# This crate uses #[feature(rustc_private)].
Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ Some native rustc `-Z` flags are also very relevant for Miri:
Moreover, Miri recognizes some environment variables:

* `MIRI_AUTO_OPS` indicates whether the automatic execution of rustfmt, clippy and toolchain setup
should be skipped. If it is set to any value, they are skipped. This is used for avoiding infinite
recursion in `./miri` and to allow automated IDE actions to avoid the auto ops.
should be skipped. If it is set to `no`, they are skipped. This is used to allow automated IDE
actions to avoid the auto ops.
* `MIRI_LOG`, `MIRI_BACKTRACE` control logging and backtrace printing during
Miri executions, also [see "Testing the Miri driver" in `CONTRIBUTING.md`][testing-miri].
* `MIRIFLAGS` (recognized by `cargo miri` and the test suite) defines extra
Expand Down
Loading

0 comments on commit d8c69df

Please sign in to comment.