Fork me on GitHub
#polylith
<
2022-09-21
>
seancorfield17:09:12

Almost at 100 components now!

projects: 20   interfaces: 97
  bases:    17   components: 99
92,749 lines out of 142,406 (just over 65%). That's 10 components added through refactoring in the past two weeks!

polylith 8
🙌 1
🚀 1
imre17:09:54

Nice. Did you end up trying kaocha?

seancorfield18:09:07

Not yet. I have a ticket in our backlog for it tho'...

1
james05:09:42

This is extremely impressive! Is Polylith scaling well with a codebase of this size? Or have you noticed any issues or challenges when you get to this number of components, bases, or projects?

seancorfield05:09:27

Naming gets harder when you have to think about it:grin: I've mentioned before the benefit I see in Polylith making you think about component names more.

seancorfield05:09:17

The incremental testing is proving to be a huge benefit in terms of CI builds.

seancorfield05:09:26

The only downside I can think of is that "go to definition" in your editor takes you to an interface function so then you have to move down to the call inside that and "go to definition" again.

james06:09:03

Which IDE do you use? If that’s the only downside, I’m wondering if there’s a way to fix it with tooling?

seancorfield16:09:23

VS Code w/Calva+LSP/clj-kondo. I mean, it's correct: the interface function is the definition... it's just not a useful definition. And given that interface functions don't necessarily simply delegate to an implementation function in all cases, there isn't a general rule you can follow here.

seancorfield16:09:35

Given that I have Joyride and custom REPL snippets etc, I may try to construct a "go to implementation definition" command but it's not terribly high on my agenda right now.

👍 1
Gabriel Kovacs18:09:30

Shouldn't there be a parity between the components and the interfaces? As far as I understood from the docs one can use a component only via it's interface.

imre18:09:23

Thats true but not all interfaces have a separate underlying implementation

imre18:09:31

Some just have code inline

Gabriel Kovacs18:09:20

@U08BJGV6E sorry but I did not get it 🙂 . If I would be to guess then this means that 2 components can implement the same interface.

imre19:09:36

You might be right there

😄 1
seancorfield20:09:54

@U02AMR8032L Yes, I've blogged about our use of swappable interface implementations in Polylith. We have an http-client interface with two implementations: one using the JDK's client and one using http-kit that runs on JDK 8 (because we have a legacy app). We also have two i18n implementations: one uses our DB-backed system for "real" stuff and the other one uses a JSON file so our designers can work with templates more easily, using just a small, standalone app built from our Polylith repo -- and not need the database or anything else except a local JSON file.

seancorfield20:09:02

So we have 97 component interfaces and 95 of them have a single implementation, but 2 of them have 2 implementations each. The stats above don't indicate whether an interface has code inline (and no impl.clj equivalent) by the way @U08BJGV6E

1
Gabriel Kovacs20:09:27

@U04V70XH6 thank you for the info! I just started reading your blog series on this topic. While I still don't understand all the challenges and solutions at this time I do appreciate having the possibility to read it 🙂.

seancorfield20:09:18

Feel free to DM me any time with any Qs you have about stuff in those blog posts.

❤️ 1
seancorfield22:09:46

We're at 103 components now -- 67% of our codebase converted!

👍 2
polylith 3