-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency violation not detected when using public folders for privacy boundary #188
Comments
That seems like a bug to me. Are you able to investigate? Thanks. |
Thanks for confirming it as a bug. Yes I will investigate it. |
Took a quick look - I'm pretty sure your That code should raise on your reference to From a packwerk perspective, the reference is not a dependency violation because the referenced constant can't be found. If you want to do something like this, you have a couple of options:
That would make We use both the second and third option; top level components, then packages with their own load paths nested inside of them. Load paths are set up with Rails Engines. However, the simplest solution is to just use |
Not a bug. |
Thank's for the thorough analysis. My
That is why the constants in the public folder are loaded correctly even they are not in the @exterm: Is the above configuration of zeitwerk therefore incompatible with packwerk? If yes, is it a missing feature or just not the way how packwerk is indented to work? |
|
|
|
Can you check whether #186 would fix your problem? It looks like there's a chance it will land in packwerk. |
Description
When I enforce privacy for specific constants, a dependency violation to a public constant in that package is correctly detected. As soon as I reconfigure the package and set
enforce_privacy: true
and move the public constant to the package's public folder the dependency violation is not detected anymore.I expect that the way how I declare public/private constants doesn't influence the dependency check/violations.
To Reproduce
app/models/debtors/package.yml
Expected Behaviour
Example 2 should produce the same result as example 1. The way how I define the privacy boundary should not influence which dependency violations are detected.
Version Information
The text was updated successfully, but these errors were encountered: