ci: enforce the crate map with cargo-deny and a closure-ban script #174
No reviewers
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis!174
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/deny-crate-map"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The library crates get published from v0.3.0 (#160).
crates/felis-protocol/tests/crate_purity.rsandcrates/felis-grid/tests/no_render_deps.rsrancargo treeover the workspace from a crate's own tests, so they would ship in the published package and fail outside the workspace. This moves every dependency rule into repository tooling and, on the way, makes the whole crate map tool-enforced instead of "review enforces the rest".deny.tomlencodes the "Depends on" column. Each felis library crate gets awrappersentry listing exactly the crates allowed to depend on it directly, so a new felis→felis edge failscargo denyuntil the map anddeny.tomlchange together. Plusswashonly under felis-shaping (next to #171'swgpu/winit). Dev parents are listed after a# devmarker:[graph] exclude-devwould also drop dev dependencies from the license and advisory checks.[graph] all-features = trueso optional edges are judged too.tools/dep_bans.pyencodes the "MUST NOT depend on" column over each crate's closure (cargo tree --edges normal,build --target all --all-features), for whatwrapperscannot express (e.g. felis-protocol's OS-crate ban: libc, rustix, windows-sys have dozens of external parents). With--self-test; run byjust deny(already in pr.yml/release.yml) andjust selftest.--all-features); newly enforced: tokio in vt/grid, OS crates in vt, felis-crate bans for pty/transport, render crates for daemon, swash/wgpu/winit closures for client-core/cli/shaping/render-core/render-wgpu.libc, and protocol +cfg(windows)windows-sys, fail the script.Known gap, stated in workspace.md: a crate already listed as a dev parent that promotes the edge to a normal dependency passes
cargo deny; the script catches it only when the target is in that crate's MUST NOT cell. Not caught today: client-core/cli → daemon or pty, daemon → client-core. Closing it means adding those to the MUST NOT cells, a normative change left out of this PR.Verified:
just checkgreen locally; sol review PASS (round 2; round 1's finding fixed in the second commit).73df197db7e41b54cf32e41b54cf32416a63805e416a63805ed1f60cd8ff