polylith

https://polylith.gitbook.io/ and https://github.com/polyfy/polylith
tengstrand 2021-07-04T06:22:37.165200Z

I will have a look at these problems today (I’ve been on holiday) and come back when I know more.

tengstrand 2021-07-04T06:57:46.165400Z

Does that code live under the components directory, or somewhere else?

tengstrand 2021-07-04T07:02:14.165600Z

The tool reads components from disk https://github.com/polyfy/polylith/blob/90ca45583036425ccabe932c9517cec34475ba93/components/workspace-clj/src/polylith/clj/core/workspace_clj/components_from_disk.clj#L31 so I guess you now have 23 directories under the components directory?

tengstrand 2021-07-04T15:42:34.165900Z

@seancorfield I couldn’t reproduced all your problems, but I have tried to fix them anyway. The changes are pushed to the issue-66branch together with other fixes that I was working on. It should fix your 107 error . Try it out to see if you have any remaining problems.

seancorfield 2021-07-04T15:43:42.166100Z

Right, we have 23 components now, but the ws.messaging.sdk namespace that was referenced in one of those components (actually in a bases entry I think it was) lived under a wsmessaging-sdk legacy subproject: wsmessaging-sdk/src/ws/messaging/sdk.clj which, of course, Polylith doesn't see -- so as far as its concerned, some Polylith code in bases/batch-jobs/src/ws/batch_jobs/messages.clj is trying to reference a brick that doesn't exist (because it's in one of the 40 legacy subprojects). That legacy code has namespaces that start with worldsingles (old code) and ws (newer code) and then I picked ws as the top ns for the Polylith code, not realizing it might "conflict".

seancorfield 2021-07-04T15:44:31.166300Z

Thanks, I'll update the poly tool to that latest SHA and I'll let you know if I run into any issues on Monday when I'm back at work!

seancorfield 2021-07-04T15:52:56.166500Z

Confirmed that I don't get the 107 error now on code that refers to brick-like nses that aren't Polylith interfaces.

seancorfield 2021-07-04T15:53:26.166700Z

info and test :dev :all both seem to work correctly too.

tengstrand 2021-07-04T18:17:37.166900Z

Sounds great.

seancorfield 2021-07-04T19:54:52.167800Z

"Legacy code" is any code you wrote that you would now write differently 🙂

seancorfield 2021-07-04T19:55:44.168700Z

(we have a ten year old codebase -- we have a lot of code that we would now write differently, especially as we were just learning Clojure as a team in those early days!)

tengstrand 2021-07-04T20:10:36.169700Z

Yes, that’s true. I know that some people defines it as code without tests, but that should be quite rare these days.