G0009 third-party-placement¶
Rule: Heavy third-party crates are used only by the crates the map names.
| Code | G0009 (stable, never reused) |
| Id | third-party-placement |
| Category | graph |
| Source | spirit_level |
| Fix | by hand |
| Needs | the crate map ([map] or map-file) |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | off | |
| small-workspace | off | |
| medium | off | |
| big | deny |
heavy dependencies sit in one crate each |
| ai | off | |
| embedded | off | |
| ui | off | |
| egui | off | |
| units-strict | off | |
| units-paranoid | off |
Why¶
A heavy third-party crate (a GPU stack, a browser engine, a wasm runtime, Python bindings) belongs in one crate, so a test or a binary that does not need it does not build it. [map.third-party] names the crates that may depend on it directly; anything else uses it through them.
How to fix¶
Use it through one of the listed crates, or, when the move is wanted, add the crate to the list.
Configure¶
Allow one finding in the code with // spirit-level: allow(third-party-placement) <reason> (waivers); the code works there too, as in [lints.G0009].