Commit e616ed0
committed
Move cargo vendor output to prevent conflicts and acquire file lock beforehand
This change modifies where we save the cargo configuration from cargo vendor to avoid interfering with manual
cargo operations in subdirectories. In addition, we now acquire a file lock before running cargo vendor to prevent
parallel builds from running cargo vendor at the same time.
Key Changes:
* Generate cargo vendor config to `.cargo/twoliter_cargo_config.toml` instead of `.cargo/config.toml`
* Update build.Dockerfile to mount `.cargo/twoliter_cargo_config.toml` to `.cargo/config.toml` internally
* Update all docker run commands in Makefile.toml to do the same as above
* Acquire a file lock on `.cargo/vendor.lock` before running cargo vendor to prevent parallel runs of cargo vendor
These changes resolve two issues:
* Prevents `cargo vendor` runs from occuring at the same time causing mutations to the vendored sources during parallel builds.
* Prevents manual cargo commands in sub-workspaces from entering a dependency resolution loop because of the vendored sources1 parent 23e2dcf commit e616ed0
2 files changed
+30
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
366 | | - | |
367 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
368 | 385 | | |
369 | | - | |
370 | | - | |
| 386 | + | |
371 | 387 | | |
| 388 | + | |
| 389 | + | |
372 | 390 | | |
373 | 391 | | |
374 | 392 | | |
| |||
459 | 477 | | |
460 | 478 | | |
461 | 479 | | |
462 | | - | |
| 480 | + | |
| 481 | + | |
463 | 482 | | |
464 | 483 | | |
465 | 484 | | |
| |||
495 | 514 | | |
496 | 515 | | |
497 | 516 | | |
498 | | - | |
| 517 | + | |
| 518 | + | |
499 | 519 | | |
500 | 520 | | |
501 | 521 | | |
| |||
978 | 998 | | |
979 | 999 | | |
980 | 1000 | | |
981 | | - | |
| 1001 | + | |
| 1002 | + | |
982 | 1003 | | |
983 | 1004 | | |
984 | 1005 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments