This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-17
Channels
- # adventofcode (25)
- # announcements (2)
- # babashka (16)
- # babashka-sci-dev (16)
- # beginners (213)
- # calva (15)
- # clj-kondo (126)
- # clj-on-windows (1)
- # cljdoc (5)
- # cljfx (1)
- # cljs-dev (6)
- # clojure (230)
- # clojure-europe (38)
- # clojure-nl (3)
- # clojure-uk (3)
- # conjure (10)
- # core-async (15)
- # cursive (33)
- # fulcro (58)
- # hyperfiddle (4)
- # jobs-discuss (1)
- # kaocha (5)
- # lsp (46)
- # meander (3)
- # off-topic (30)
- # polylith (10)
- # portal (9)
- # re-frame (5)
- # reitit (7)
- # releases (2)
- # ring (17)
- # sci (8)
- # shadow-cljs (6)
- # specter (1)
- # sql (1)
- # testing (9)
- # tools-deps (4)
- # vim (12)
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?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.
We have moved our Specs into <top-ns>.<component>.interface.specs
as we've refactored our codebase. That's worked very well for us.
I suppose it's not really possible to split a multimethod across components.
or is there some trick to re-exporting them that I don't know about?
You can for sure, you just have to (somewhere that gets loaded) require the namespaces that define the implementations for them to be included.