Friday 13 January 2023

packwerk for enforcing boundaries between components

Shopify's packwerk seems to be an interesting gem for enforcing boundaries between your components. Rails is a laissez faire system, which works great up until your codebase gets huge and dependency violations start making it hard to separate out merges. You can inprove that by pulling stuff out into separate components (each with their own area of concern), but it's an honour-system and that means that people will forget, or not know that there's a less-coupled way of grabbing out something they really shouldn't be grabbing directly. Having a gem that scans your code to point out when you're doing that helps you keep those components loosely coupled.

Note: I haven't used it in anger - just thought it looked like a neat solution to a perennial issue.

No comments: