Fork me on GitHub
#polylith
<
2021-12-17
>
Eugen10:12:44

do you use a lot of local libraries as well with polylith? We have some violations like the one bellow:

Error 101: Illegal dependency on namespace document.specs in annotator.specs. Use document.interface instead to fix the problem.
I don't think the specs should be (re-imported) in an interface to be exposed. Any recommendations on how to handle things like this?

furkan3ayraktar11:12:47

If annotator.specs requires the document.specs, those specs needs to be exposed by an interface of the document component. You could have more than one interface file, such as document.interface and document.interface.specs. You can check out https://github.com/furkan3ayraktar/clojure-polylith-realworld-example-app/tree/master/components/article/src/clojure/realworld/article.

Eugen12:12:01

will try it. looks good.

1
seancorfield17:12:50

We have moved our Specs into <top-ns>.<component>.interface.specs as we've refactored our codebase. That's worked very well for us.

Eugen18:12:08

thanks for confirming

Braden Shepherdson20:12:01

I suppose it's not really possible to split a multimethod across components.

Braden Shepherdson20:12:15

or is there some trick to re-exporting them that I don't know about?

Joshua Suskalo21:12:55

You can for sure, you just have to (somewhere that gets loaded) require the namespaces that define the implementations for them to be included.

emccue21:12:09

expose a function and a register-impl function?