<@U72G25YSG30> The idea here is that instead of using packs-rails, you could choose to follow the Rails Docs to create an engine and then add a package.yml to make your engines a packwerk package.
Rails engine “autoload paths” (how zeitwerk, and therefore Rails, finds your code), are automatically set up by Rails. packs-rails sets up autoload paths manually, and does some other things.
The engine: true directive turns a folder of code into an “actual rails engine,” albeit through unconventional means (e.g. invoking certain Rails APIs to tell Rails that a folder of code is an engine, etc.)
We like packs-rails because we believe it provides an even simpler API than engines. As Rails engines become even simpler to use, and other frameworks (like rspec) support modular development out of the box, I wouldn’t be surprised if we no longer need packs-rails and are happy with the APIs provided by the underlying tools.
For what it’s worth, I think it’s possible to create a Rails engine without a Gemfile and only execute the tests for that Rails engine in the context of your broader modulith. That’s how packs-rails does it (tests are never run in isolation, which is why we don’t need separate Gemfiles)
Engines approach require as well to implement dependency management solution, so if engine A is changed, tests from engine B (which depends on A) also should be run.
Sounds good to me! An important principle of the toolchain (including packs-rails) is that you should be able to easily migrate off of it if you want different trade offs
Interestingly, I found the vanilla packwerk+rails engine approach while I was at Shopify pretty pleasant so their recommendation resonates with me based on that experience.
Though I think the lower lift of packs-rails will bring wider adoption of packwerk