Fork me on GitHub
#polylith
<
2021-06-08
>
seancorfield06:06:56

In which I talk about some of the benefits we’re finding from our early use of Polylith: https://corfield.org/blog/2021/06/06/deps-edn-monorepo-3/

polylith 23
👍 4
🎉 4
tengstrand06:06:34

Nice and well written blog post! I agree with everything you write.

6
flightcubs07:06:46

Thanks for sharing 🙂

cyppan08:06:45

when running clojure -M:poly ... where is the polyfy/polylith github repo cloned?

seancorfield08:06:19

Into ~/.gitlibs

seancorfield08:06:52

That's standard Clojure CLI behavior

cyppan08:06:15

Oh! Clojure CLI noob here 😁 thanks !

seancorfield23:06:28

The Clojure CLI can execute any (public) function that accepts a hash map. That means you can do:

clojure -X:dev com.acme.thing.interface/some-process
and it will execute a function from components/thing using the development project. That’s a pretty heavy-handed set of dependencies so would you: a) stick with the above and just not care about the overhead of the full set of :dev dependencies? b) create an ad hoc alias in the workspace-level deps.edn file to support this exec usage? (bearing in mind you’ll need to maintain it and update it if the component’s dependencies change) c) create a projects entry to provide a Polylith-“compatible” deps.edn file to support this exec usage? (at which point I’d say, hey, is it reasonable to have a project that uses no bases?) (this question just cropped up today at work as I’m about to refactor part of our build tool pipeline into a Polylith component)

tengstrand04:06:16

Good morning! I think I would go for option c if that can help out with the dependencies (I’m not sure what changes you want do to the new project though). And yes, you are free to create projects that don’t include bases. The polylith codebase contains the api project itself that was an experiment where I AOT compiled a library that I used from Kotlin to test if I could reuse the polyfunctionality from another language (it’s not publicly exposed at the moment, but I have an idea to expose two variants, one “normal” clj version and one AOT compiled). So building libraries is one use case, but your use case seems perfectly fine for me.

👍 2