Issue with Non-Memoized Layers in `Layer.orElse` Usage
Hi! We're seeing that some layers can be not memoized when using
The issue we face is that layers provided to the failing layer are not memoized so they are being built multiple times for nothing.
You can see a reproduction here where we create the common layer twice while we'd expect it to be created only once.
Does this ring a bell to somebody. Is it an expected behavior?
Layer.orElse We rely on Layer.orElse to try to build a layer and fallback to another one if something fails (like some env variables are missing)The issue we face is that layers provided to the failing layer are not memoized so they are being built multiple times for nothing.
You can see a reproduction here where we create the common layer twice while we'd expect it to be created only once.
Does this ring a bell to somebody. Is it an expected behavior?
