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
Specifically, the following [section in Overriding dependencies](http://doc.crates.io/specifying-dependencies.html#testing-a-bugfix) reveals what the problem is:
454
+
455
+
> Next up we need to ensure that our lock file is updated to use this new version of uuid so our project uses the locally checked out copy instead of one from crates.io. The way [patch] works is that it'll load the dependency at ../path/to/uuid and then whenever crates.io is queried for versions of uuid it'll also return the local version.
456
+
>
457
+
> This means that the version number of the local checkout is significant and will affect whether the patch is used. Our manifest declared uuid = "1.0" which means we'll only resolve to >= 1.0.0, < 2.0.0, and Cargo's greedy resolution algorithm also means that we'll resolve to the maximum version within that range. Typically this doesn't matter as the version of the git repository will already be greater or match the maximum version published on crates.io, but it's important to keep this in mind!
458
+
459
+
This says that when we updated the submodule, the version number in our
460
+
`src/tools/rustfmt/Cargo.toml` changed. The new version is different from
461
+
the version in `Cargo.lock`, so the build can no longer continue.
462
+
463
+
To resolve this, we need to update `Cargo.lock`. Luckily, cargo provides a
464
+
command to do this easily.
465
+
466
+
First, go into the `src/` directory since that is where `Cargo.toml` is in
467
+
the rust repository. Then run, `cargo update -p rustfmt-nightly` to solve
468
+
the problem.
469
+
470
+
```
471
+
$ cd src
472
+
$ cargo update -p rustfmt-nightly
473
+
```
474
+
475
+
This should change the version listed in `src/Cargo.lock` to the new version you updated
476
+
the submodule to. Running `./x.py build` should work now.
0 commit comments