Fork me on GitHub
#polylith
<
2023-05-30
>
Norman Kabir10:05:31

We have two teams with their own separate Polylith projects. Is it possible for them to share their components? For example, a developer clones each polylith project:

/home/{user}/poly1
/home/{user}/poly2
Can components be symlinked between these two projects?
/home/{user}/poly1
  components/
  components-2/ -- symlink --> /home/{user}/poly2/components
Or is there a better way for two teams to share components and retain the benefits of the Polylith?

james10:05:09

Is there a reason why they are separate workspaces? Polylith is designed to be a monorepo per company, rather than per team.

Norman Kabir13:05:21

Agreed. However, in this case, there are two separate teams. For various internal reasons, they have separate repositories and separate corporate governance. However, it would be helpful for them to share components (lego bricks) but not bases or projects.

Norman Kabir13:05:20

We are using the Python Polylith tool for our Python codebase and it works great with this pattern. The component folder is scoped under a Python namespace so sharing components is easy.

components/
  namespace-1/
    ...team-1 components
  namespace-2/ <-- symlink
    ...team-2 components

David Vujic21:05:07

Hi! Just curious, are you using symlinks with the Python setup too? How do you deploy the artifacts, is it from the local dev machines?

james08:05:04

I think you’ll need to share your code as libraries in this multiple repo situation, which is a shame, because you lose most of the benefits that Polylith gives you.