This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-22
Channels
- # announcements (88)
- # autochrome-github (2)
- # babashka (26)
- # beginners (5)
- # biff (2)
- # cider (73)
- # clj-kondo (4)
- # cljsrn (6)
- # clojure (54)
- # clojure-art (3)
- # clojure-europe (73)
- # clojure-germany (5)
- # clojure-new-zealand (1)
- # clojure-nl (13)
- # clojure-norway (16)
- # clojure-uk (8)
- # clojurescript (73)
- # conjure (1)
- # core-async (10)
- # cursive (17)
- # datahike (51)
- # datalevin (21)
- # datomic (4)
- # emacs (2)
- # events (3)
- # fulcro (35)
- # honeysql (6)
- # introduce-yourself (1)
- # jackdaw (3)
- # jobs (1)
- # leiningen (4)
- # lsp (3)
- # malli (17)
- # off-topic (60)
- # other-languages (5)
- # pathom (17)
- # pedestal (3)
- # polylith (19)
- # portal (2)
- # practicalli (1)
- # rdf (14)
- # reitit (3)
- # releases (1)
- # reveal (9)
- # sci (1)
- # shadow-cljs (26)
- # spacemacs (17)
- # sql (4)
- # testing (10)
- # tools-build (6)
- # tools-deps (16)
- # vim (9)
Anyone renamed all there interface files ? wondering if there is a simple way to rename in all the files and filenames, decided interface is not a good default given clojure runs on many runtime and it causes issues on javascript runtimes, so thinking of using something like ensemble unless other know of some other tricks for js ?
@UU67HFS2X You can set :interface-ns
in workspace.edn
to use something other than interface
in your Polylith setup.
yeah I was aware of that, just means I have to go through updating the namespace and files in a lot of components to match unless it can take a vector I guess, which is why I wondered if anyone had done something similar seems the interface conflict will hit anyone working with js as interface is a reserved word
I don't know how many folks are using ClojureScript with Polylith but I would have expected someone to have run into the interface
/JS issue by now...?
We have 3 cljs apps, but all the code is still tied up in bases. So blissfully unaware of what you are talking about
yeah i have been splitting out the react components into polylith components in cljc files but when ever hotreload is triggered it give you warnings about interface being renamed to interface$ you can live with it but it is rather annoying, I was doing the same before hand though storing it all in a base
I have a component A that depends on another component B. This dependency is declared in the deps.edn
of A. When I include A in my project, the poly tool says it’s missing the interface of B (Error 107). Is this correct? Should I always declare all components top-level?
I’m guessing swappable implementations don’t work anymore when components depend on each other via deps.edn
Yeah. I understand that dependencies between bricks shouldn’t be explicitly declared, so the Polylith tool has a command to calculate them.
Dependencies between bricks should be in the project deps.edn
file, not the bricks' deps.edn
files.
(and :dev
is a project in the workspace-level deps.edn
file)
Only libraries should be in the bricks' deps.edn
files.
The "missing" error comes about because poly
looks at projects for those cross-brick dependencies and in your case it is missing from :dev
and whichever projects depend on A.
@U0FT7SRLP Does that make sense?
Maybe this is too pedantic, but the project deps.edn
doesn’t say “A depends on B,” as much as “this project uses both A and B.”
Indeed, because deps really is about source code, or implementations, while the components depend on namespaces, or interfaces
Thanks all. @U04V70XH6 Yeah it makes sense now. From the error itself I couldn’t figure it out. But by trial and error I started to realize what was going on
@U0295UQ75FG Yup. I meant that if project X "depends on" (uses) A in :deps
then it must also list B in :deps
. Pedantry is important here 🙂
I don't know how many folks are using ClojureScript with Polylith but I would have expected someone to have run into the interface
/JS issue by now...?