Commit 030cacc
* fix: include crates/contracts/* in the workspace (#10550)
cargo's `exclude` matches by path prefix and outranks the `members` globs, so
`exclude = ["crates/contracts"]` silently dropped all 18 `crates/contracts/*`
crates out of the workspace -- the `"crates/contracts/*"` members entry never
had any effect. cargo resolved 25 members against 43 crates on disk.
Nothing warned, because every contract crate is a path dependency of a member:
they still compiled, so `cargo build` stayed green while `--workspace` package
selection never saw them. 199 `#[test]` functions across 12 contract crates
were never compiled, let alone run, by `cargo check --workspace --tests`,
`cargo test --workspace`, or clippy.
The exclude was not gratuitous -- a bare `crates/*` glob also matches the
`crates/contracts` grouping directory, which has no manifest, and cargo hard
errors on it. Prefix-qualifying both globs as `homeboy-*` keeps the grouping
directory out of the match set, so the exclude is no longer needed. All 42
crates already carry that prefix.
Cargo.lock is unchanged and `--locked` still resolves.
Expect fallout: this compiles and runs 199 tests for the first time.
* test: fail closed when a crate is missing from workspace members (#10550)
The prefix-qualified members globs fix the contracts drop, but trade one silent
failure mode for another: a crate added under `crates/` without the `homeboy-`
prefix would be just as invisible to every `--workspace` gate as the contract
crates were.
Compare crate directories on disk against what the globs can match, and assert
the `exclude = ["crates/contracts"]` workaround is not reintroduced.
---------
Co-authored-by: chubes-bot <266378653+homeboy-ci[bot]@users.noreply.github.com>
1 parent 7e3c664 commit 030cacc
2 files changed
Lines changed: 98 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
0 commit comments