What is Packwerk and how does it work?
mainPackwerk is a Ruby gem designed to enforce boundaries and modularize Rails applications. It allows you to:
- Group files into packages: Define logical boundaries within your codebase.
- Define package-level constant visibility: Control which constants are publicly accessible from outside a package.
- Incremental modularization: Help existing codebases become more modular without obstructing active development.
Core Mental Model: Packwerk performs static analysis on constant references. It does not analyze method calls or objects passed around the application. If you need to analyze method parameters, you should use Sorbet type signatures, as Packwerk understands Sorbet's use of constants for types.