mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-28 16:07:05 +00:00
refactor(protos): move compat manifest send-site assertions into owning crates (#6618)
refactor(protos): move internode compat manifest send-site assertions into owning crates Promotes the rolling-upgrade dual-write manifest from a test-only constant in rustfs-protos into the public rustfs_protos::compat_manifest module, moves the JSON-encoder send-site assertions into the crates that own the asserted sources (ecstore remote_disk.rs for requests, the rustfs binary node_service/disk.rs for responses), and splits the scanner Phase-0 overlap inventory so its heal- and ecstore-owned halves live in those crates. Adds a cross-crate include_str!/include! guard with fixture self-tests to scripts/check_layer_dependencies.sh so a library crate can never again read another crate's Rust source at compile time, and records the rule in docs/architecture/crate-boundaries.md. Part of rustfs/backlog#1884.
This commit is contained in:
@@ -35,6 +35,13 @@ wire types still live in `rustfs-filemeta`. This keeps the temporary dependency
|
||||
centralized until those wire contracts can move without introducing a
|
||||
`rustfs-replication` / `rustfs-storage-api` cycle.
|
||||
|
||||
Dependency direction also applies to compile-time source reads:
|
||||
`include_str!`/`include!` of a `.rs` file must not resolve outside the
|
||||
including crate's own directory (`scripts/check_layer_dependencies.sh`
|
||||
enforces this). A source-text tripwire belongs in the crate that owns the
|
||||
asserted file; shared expectations move into a contract surface such as
|
||||
`rustfs_protos::compat_manifest` and are asserted by each owning crate.
|
||||
|
||||
Existing migration checks live in:
|
||||
|
||||
- `scripts/check_layer_dependencies.sh`
|
||||
|
||||
Reference in New Issue
Block a user