kontext-e / uneven-modules

Some made-up project for architecture improvement demos
Apache License 2.0
2 stars 3 forks source link

WrongDirection not detected when subpackages are used #4

Open ascheman opened 7 years ago

ascheman commented 7 years ago

I think there is an error the example:

Add an error

Introducing two new classes (cf. ascheman/uneven-modules@2138b292f23d9514a7aada56991fe63fed51196e):

The latter imports the former which is an architecture violation which is detected and the build fails.

And make it disappear

If the two classes are moved to sub-packages (cf. ascheman/uneven-modules@8f29af906979964398a5bf2039b59a0fe8777ef7), e.g.,

The architecture violation magically vanishes and the build is OK. I would expect that even access from/to sub packages is disallowed by the architecture blueprint.

ascheman commented 7 years ago

The two commits in my fork show that the error is detected but vanishes if the Classes are moved to sub packages.

kontext-e commented 7 years ago

I'll flag this as a bug as you suggested b/c I introduced the concepts "PackageLevel" and "TransitivePackageDependencies" to prevent exact this situation.

ascheman commented 7 years ago

Thanks to @jensnerche and @dirkmahler I could finally fix the problem and propose a working solution. PR is following soon.