Fork me on GitHub
#polylith
<
2023-08-29
>
J12:08:35

Hi guys! I have two components C1 and C2. C2 use C1 . It’s allowed to define in the deps.edn of C2the usage of C1 ? or it’s not and I must define C1and C2 on the project

tengstrand13:08:04

You should not specify any components in a component's deps.edn file. Components are only specified in the project's deps.edn files.

👍 2
Hasan Ahmed17:09:58

@U1G0HH87L, interesting, can you elaborate more on this? I thought it'd be easier to know component dependencies from it's deps.edn even if the dependencies are other components

tengstrand19:09:57

Bases and components don't know about concrete components, they only know about interfaces . It's the projects that know which components to include and that's where things are connected. You can have more than one component that implements the same interface (e.g. a1 and a2 ) and because you don't specify which concrete components your bricks depend on, you can swap implementation (if you like) from e.g. a1 to a2 in a project, because both implements the same interface, e.g. a .

👍 2