Fork me on GitHub

Today we welcome to the 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. 🙂

polylith 4
🚀 2

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: 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. 🙏


;; 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?


I posted an answer in the gist @U05476190.


@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 ;)


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!