Exclude does not apply to `load_paths`
sarahsehr opened this issue · 2 comments
My CI vendor
folder contents is slightly different from my local environment. This produces different load_paths
value in packwerk.yml
causing this failure "Load path cache in #{@config_file_path} incorrect!"
Is there any way to get around this cache issue? I see the exclude
option does not affect the load paths at all. I'm not sure that it makes sense for it to, although I'm never going to define anything in vendor
as a package.
I also have issues with ETA: Actually, these are valid violations since the classes are defined twice.check
because it causes the ERROR: 'X' could refer to any of
error since some model classes are defined in a gem and also the Rails application. I do not have these issues locally since vendor
is not in the load_paths
.
I should note that I'm using Rails 5.2.4
Interesting! We have not encountered a case before where load paths are different in CI vs locally. Can you expand on why that is the case? I'd like to understand the use case better.
I should note that I'm using Rails 5.2.4
Note that packwerk only runs correctly on apps that are using zeitwerk
, which comes with Rails 6
https://github.com/Shopify/packwerk#prerequisites
Closing this for now since packwerk 2.x deprecates load_paths
in favor of getting them from Rails.
Please leave another comment or reopen if you or anyone else continues to see an issue!