Fork me on GitHub
#polylith
<
2021-08-10
>
tengstrand08:08:42

Today we welcome https://funnel.io/ to the https://app.gitbook.com/@polylith/s/polylith/conclusion/production-systems page! Don’t hesitate to add your Polylith system to this page, even if you think it’s too small. It’s not about the size (!) and it can be interesting for other people to see that even small systems can benefit from Polylith. You can always contact me later if the workspace grows, and I will update the page. 🙂

3
polylith 4
🚀 2
pithyless10:08:40

I'm trying to figure out a migration strategy from our existing monorepo to polylith, so I've tried to come up with a minimal repro case: https://gist.github.com/pithyless/90ca3d4437a3b76df42a9b9032103557 There are some questions at the end of the gist (I will paste into this thread as well). I would really appreciate any insights in how to go about migrating this project. 🙏

pithyless10:08:28

;; Migration strategy questions:
;;
;; (Q1) I expect (2) will become a poly interface `com.example.logger.interface`.
;;
;; (Q2) Can I still use internal protocols for implementing stateful components, like in (1)?
;;
;; (Q2A) If so, where would this file be located to be shared?
;; Perhaps `com.example.logger.interface.protocol` and the prior is `com.example.logger.interface.api` -
;; but no idea if protocol sharing is supported like this?
;;
;; (Q2B) If not, I assume we just replace the protocol methods (ie. `log`) with new functions that exist
;; as interfaces in each of (3) and (4)?
;; When you do want to dispatch on type, protocols are more natural than poly interfaces.
;;
;; (Q3) If I convert (3) and (4) to poly components, then I need to either:
;;
;; (Q3A) use a common interface and `:profiles`,
;; but cannot have both on the classpath and in the project at the same time
;;
;; (Q3B) move them to a "lib" folder and treat them as regular `:local/root` deps,
;; but then I assume they will not participate in the poly dependency logic for checking
;; which code is stable, tests needed to run, etc?
;;
;; (Q3C) some other solution?

tengstrand11:08:36

I posted an answer in the gist @U05476190.

pithyless11:08:40

@U1G0HH87L much appreciated, I posted a followup in the gist. Are you still replying from your vacation? If so, I owe you a 🍻 if we ever meet at a live event ;)

tengstrand12:08:17

Yes, I try to reply whenever I have time! I read your latest reply, and will have another look at it later today. Let’s have a beer when this pandemic is over!