polylith

tengstrand 2024-09-17T08:04:35.601679Z

The whole Polylith team, me, @furkan3ayraktar and @james are going to the https://2024.heartofclojure.eu and we are really looking forward to it! See you there!

👍 3
👍🏼 1
👀 1
❤️ 4
⭐ 2
mitchelkuijpers 2024-09-17T08:11:16.188839Z

Awesome, see you there!

🎉 2
kauppilainen 2024-09-17T08:58:35.801249Z

Cool! See you there 🙂

1
seancorfield 2024-09-17T17:42:34.228099Z

Will any of you be at Conj next month?

furkan3ayraktar 2024-09-17T18:42:03.043259Z

No, unfortunately. I wish I could come! It’s on my wish list, one day…

tengstrand 2024-09-17T18:43:31.285579Z

The same answer for me, unfortunately. Couldn’t make it this time.

Sophie 2024-09-20T17:47:20.325429Z

Hey, it was really nice meeting you at heart of clojure! Greetings from Otto

🙌 1
tengstrand 2024-09-20T18:30:31.904269Z

It was great fun meeting all the users of Polylith!

❤️ 1
licht1stein 2024-09-17T15:55:58.365339Z

Hi What is the recommended way to reuse components in a different workspace? Let’s say I have a strings component with useful string related functions, and now I just keep copying it from project to project. I can’t have all projects in a single repo because I’m consulting different clients, and each client gets a separate repo for obvious reasons. Decided to ask first, before figuring out how to do it with git subtree or something. Thanks!

2024-09-17T16:23:12.101999Z

I think that's just called a "library"

licht1stein 2024-09-17T16:35:51.214399Z

Great, so you suggest doing exactly what polylith helps me not to have to do — manage each component as a separate library, update versions etc.

2024-09-17T16:41:35.201549Z

it is the form that exactly captures the relationship between the code bases you are describing

licht1stein 2024-09-17T16:42:29.369479Z

Then I want a different form 🙂 Also, the point would be to be able to interact with this “library” code the polylith way, editing it in one place interactively, without having to commit a new version to use it in dev. I mean, of course you can call it a library, but I want a seamless way to extract it into a private library out of the monorepo.

2024-09-17T16:43:38.008389Z

the reason code works in a mono repo as versionless dependencies is that it is being developed together in lockstep

2024-09-17T16:44:04.615589Z

introducing an unversioned out of tree dependency sounds like a nightmare

licht1stein 2024-09-17T16:44:24.156689Z

Yes. So I’m looking for a better way

licht1stein 2024-09-17T16:45:28.973149Z

That’s why I mentioned git subtree. Maybe just put all of these components into one separate repo, and subtree into each workspace that uses them.

👍 1
furkan3ayraktar 2024-09-17T18:48:52.788419Z

I am open to hearing what could be a different solution to this problem. We have brainstormed a lot about this in the past (and now, on the plane with Joakim while travelling to the Heart of Clojure), and we could not find a solution that satisfied us and was better than a library. There may be a solution somewhere that we haven’t discovered. A good solution to this problem would be a great addition to Polylith’s offering.

licht1stein 2024-09-17T19:43:57.358889Z

Well, now you really got me thinking too 🙂

Norman Kabir 2024-09-18T12:43:23.508059Z

I’ve had good results treating “components” as its own git repository of “LEGO pieces”. Depending on the circumstance, I’ll symlink, submodule, or subtree into a workspace. It’s become the “chest of LEGO pieces” that are used in different workspaces.

imre 2024-09-18T13:00:20.279479Z

never used subtree before, does that merge the foreign "components" folder into your repo's components folder?

Norman Kabir 2024-09-18T13:03:47.183189Z

I use components as a single repo. All my components live there so no components merging is necessary. Each workspace may work on a separate branch of components and merge/rebase as needed using standard git workflows. It’s one communal LEGO bin shared among workspaces.

Norman Kabir 2024-09-18T13:04:39.397559Z

Depending on your needs, you may be able to symlink a components repo as a start.

licht1stein 2024-09-18T15:49:32.389649Z

@nkabir Symlink is something I definitely don’t want to do, since I want it to be accessible from the repo.

licht1stein 2024-09-18T15:49:52.926359Z

But a subtree of one repo with common components should be workable

Norman Kabir 2024-09-18T15:50:51.173389Z

Certainly--a symlink is the simplest yet least versatile option.

Mark Sto 2024-11-16T06:45:06.208489Z

Symlinks don’t play well with Clojure CLI/Deps projects.