qossmic / deptrac

Keep your architecture clean.
https://qossmic.github.io/deptrac
MIT License
2.6k stars 135 forks source link

Throw an error when undefined layer is referenced in the layer collector #1382

Closed patrickkusebauch closed 6 months ago

patrickkusebauch commented 6 months ago

Fixes: #1381

Fixes a case where we silently skip over collectors that we deem "unresolvable". This is a vestigial case from a time when we first implemented the "Layer" collector. With the current state of the code, it is not necessary to check if a collector is "resolvable" and it can just fail when it throws an exception while we try to run it.

These exceptions are already properly covered and rethrown to the end-user.

With this change, the result of running the deptrac.yaml from the issue will cause:


 [ERROR] Analysis finished with an Exception.

         Invalid collector definition.

         Unknown layer "Domain_typo" specified in collector.