rubyatscale / packs-rails

packs-rails establishes and implements a set of conventions for splitting up large monoliths.
MIT License
268 stars 26 forks source link

Adding `lib` directories to autoload paths #5

Closed bravehager closed 2 years ago

bravehager commented 2 years ago

First of all, thanks for putting this gem together. I'm sure a lot of engineering teams have been relying on their own (potentially janky) setup for adopting Packwerk.

I'm trying to switch a project over right now, but it seems like the lib directory of each package isn't automatically autoloaded. Is there an easy way to configure this via Stimpack, or should we just be configuring that elsewhere?

I also realize that autoloading lib is a bit of bad practice but it seems fairly pervasive (especially in older Rails projects).

ngan commented 2 years ago

Hey @bravehager -- I don't think we'll do this unless Rails does this out of the box. An easy workaround is to just add a lib directory in app. Thanks for filing an issue!