Deep modules and cycles: what deslop-please checks

10 steps · about 3 h 44 min · Intermediate

  1. Packages, Crates, and Modules - The Rust Programming Language (doc, The Rust Book, 20 min)

    The linter works on Rust module trees, so you first need the vocabulary of packages, crates and modules.

  2. Visibility - Rust By Example (doc, Rust By Example, 15 min)

    Privacy is how a module hides its internals, so you need to see pub, pub(crate) and pub(super) in action before talking about interfaces.

  3. Visibility and privacy - The Rust Reference (reference, The Rust Reference, 15 min)

    The precise rules show how to keep a module's public surface narrow.

  4. On the criteria to be used in decomposing systems into modules (blog, The Morning Paper (Adrian Colyer), 10 min)

    A short summary of the 1972 idea that each module should hide a design decision, which the rest of the list builds on.

  5. On the Criteria To Be Used in Decomposing Systems into Modules (article, D.L. Parnas (hosted by UWA), 40 min)

    Read the original paper with its two worked decompositions once the summary has given you the idea.

  6. A Philosophy of Software Design | John Ousterhout | Talks at Google (video, Talks at Google (YouTube), 1 h)

    Ousterhout himself explains deep modules, the ideas behind linters like deslop-please's shallow-module check.

  7. A Philosophy of Software Design: My Take (and a Book Review) (article, The Pragmatic Engineer, 12 min)

    A practitioner's critique shows where deep-module advice holds up and where judgment is needed.

  8. Circular dependency (article, Wikipedia, 10 min)

    Defines cycles between modules and why they are an anti-pattern, which prepares you for the linter's module-cycle and tangle reports.

  9. How to Detect Circular Dependencies in Java, TypeScript, Python and Go (article, DEV Community, 12 min)

    Shows concrete ways to find cycles and break them by inverting a dependency or extracting the shared part.

  10. deslop-please: Bring (back) sanity to your code (repo, deterministic-machines (GitHub), 30 min)

    Now install it, run it on a Rust project, and fix what it flags by redesigning rather than hiding the problem.