Fork me on GitHub
#polylith
<
2023-08-03
>
Yuhri Graziano Bernardes21:08:02

Hi everyone I'm trying to run some tests but I'm getting this error:

Error 101: Illegal dependency on namespace commons.serdes.content-negotiation in webserver.server. Use commons.core instead to fix the problem.
Is there a way to ignore this error? I have a really small component to store all small things common between components like json handling. If it's not possible, I would need to put everything being exporter through commons.core namespace or create a component for each thing that would be included in the commons component, like components/serdes and components/http-client Edit: Also Idk if it would go against polylith architecture principles.

tengstrand03:08:39

You have to put code that you need to access from other bricks, in the interface. If you don't want to put everything in a single interface namespace, you can use sub-interfaces also, like serdes.interface.stuff . See an example https://github.com/polyfy/polylith/tree/master/components/util/src/polylith/clj/core/util/interface.

tengstrand04:08:35

From tests, you are allowed to access any namespace.