@@ -242,7 +242,7 @@ Cargo has no way right now of after-the-fact debugging "why was that rebuilt?"
242
242
243
243
Some issues we've seen historically which can cause crates to get rebuilt are:
244
244
245
- * A build script prints ` cargo:rerun-if-changed=foo ` where ` foo ` is a file that
245
+ * A build script prints ` cargo:: rerun-if-changed=foo ` where ` foo ` is a file that
246
246
doesn't exist and nothing generates it. In this case Cargo will keep running
247
247
the build script thinking it will generate the file but nothing ever does. The
248
248
fix is to avoid printing ` rerun-if-changed ` in this scenario.
@@ -280,38 +280,38 @@ issue](https://github.com/rust-lang/cargo/issues/new)!
280
280
281
281
Have you seen the error message above?
282
282
283
- This is one of the most annoying error message for Cargo users. There are several
284
- situations may lead us to a version conflict. Below we'll walk through possible
283
+ This is one of the most annoying error message for Cargo users. There are several
284
+ situations may lead us to a version conflict. Below we'll walk through possible
285
285
causes and provide diagnostic techniques to help you out there:
286
286
287
- - The project and its dependencies use [ links] to repeatedly link the local
288
- library. Cargo forbids linking two packages with the same native library, so
289
- even with multiple layers of dependencies it is not allowed. In this case, the
290
- error message will prompt: `Only one package in the dependency graph may specify
291
- the same links value`, you may need to manually check and delete duplicate link
287
+ - The project and its dependencies use [ links] to repeatedly link the local
288
+ library. Cargo forbids linking two packages with the same native library, so
289
+ even with multiple layers of dependencies it is not allowed. In this case, the
290
+ error message will prompt: `Only one package in the dependency graph may specify
291
+ the same links value`, you may need to manually check and delete duplicate link
292
292
values. The community also have [ conventions in place] to alleviate this.
293
293
294
- - When depending on different crates in the project, if these crates use the same
295
- dependent library, but the version used is restricted, making it impossible to
296
- determine the correct version, it will also cause conflicts. The error message
297
- will prompt: ` all possible versions conflict with previously selected packages ` .
294
+ - When depending on different crates in the project, if these crates use the same
295
+ dependent library, but the version used is restricted, making it impossible to
296
+ determine the correct version, it will also cause conflicts. The error message
297
+ will prompt: ` all possible versions conflict with previously selected packages ` .
298
298
You may need to modify the version requirements to make them consistent.
299
299
300
- - If there are multiple versions of dependencies in the project, when using
301
- [ ` direct-minimal-versions ` ] , the minimum version requirements cannot be met,
300
+ - If there are multiple versions of dependencies in the project, when using
301
+ [ ` direct-minimal-versions ` ] , the minimum version requirements cannot be met,
302
302
which will cause conflicts. You may need to modify version requirements of your
303
303
direct dependencies to meet the minimum SemVer version accordingly.
304
304
305
- - If the dependent crate does not have the features you choose, it will also
306
- cause conflicts. At this time, you need to check the dependent version and its
305
+ - If the dependent crate does not have the features you choose, it will also
306
+ cause conflicts. At this time, you need to check the dependent version and its
307
307
features.
308
308
309
- - Conflicts may occur when merging branches or PRs, if there are non-trivial
310
- conflicts, you can reset all "yours" changes, fix all other conflicts in the
311
- branch, and then run some cargo command (like ` cargo tree ` or ` cargo check ` ),
312
- which should re-update the lockfile with your own local changes. If you previously
313
- ran some ` cargo update ` commands in your branch, you can re-run them that this
314
- time. The community has been looking to resolve merge conflicts with ` Cargo.lock `
309
+ - Conflicts may occur when merging branches or PRs, if there are non-trivial
310
+ conflicts, you can reset all "yours" changes, fix all other conflicts in the
311
+ branch, and then run some cargo command (like ` cargo tree ` or ` cargo check ` ),
312
+ which should re-update the lockfile with your own local changes. If you previously
313
+ ran some ` cargo update ` commands in your branch, you can re-run them that this
314
+ time. The community has been looking to resolve merge conflicts with ` Cargo.lock `
315
315
and ` Cargo.toml ` using a [ custom merge tool] .
316
316
317
317
0 commit comments