Trouble with Local Dependency Provision in Layered Architecture

Hi!
I'm trying to locally provide some of my dependencies - but they it doesn't seem to work the way I expected.

- I'm providing MessageRepository to BaseAgent with Layer.provide
- But it doesn't seem to actually provide it further down the dependency tree
- It works if I add the dependency up at the top level where I'm using Layer.mergeAll <- but there are a lot of dependencies I'd prefer to keep away from the top to simplify usage a bit

Does anyone here know what I'm missing?
Screenshot_2024-09-21_at_10.30.35_PM.png
Screenshot_2024-09-21_at_10.30.57_PM.png
Screenshot_2024-09-21_at_10.31.17_PM.png
Screenshot_2024-09-21_at_10.35.35_PM.png
Was this page helpful?