Layer Dependencies and Merging for Effect Implementation
Hi there. Just a quick question regarding layers. I have an effect that depends on services B and C. Service B depends on services D and E. Service C depends on services D and F. If I do as explained in the documentation, I should provide layers D and E to layer B, layers D and F to layer C, then merge layer B and C and provide the result to my effect. That works.
However, I noticed that the following works also (compiles and seems to executes without any problem): I merge layers B and C, provide layers D,E,F to the merged result and finally provide the resulting effect to my effect.
When there are many levels of layers with the same layers being used several times at differen levels, it simplifies a lot the construction of my final layer. But could this lead to unexpected errors? Is it preferable to always reflect the service dependency tree when building layers?
However, I noticed that the following works also (compiles and seems to executes without any problem): I merge layers B and C, provide layers D,E,F to the merged result and finally provide the resulting effect to my effect.
When there are many levels of layers with the same layers being used several times at differen levels, it simplifies a lot the construction of my final layer. But could this lead to unexpected errors? Is it preferable to always reflect the service dependency tree when building layers?
