7mind / izumi

Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
https://izumi.7mind.io
BSD 2-Clause "Simplified" License
612 stars 65 forks source link

Private bindings #1968

Closed pshirshov closed 3 days ago

pshirshov commented 1 year ago

We might want to support "private" bindings which would never be exposed in Locators produced by the interpreter.

It might be useful to, for example, hide bootstrap context members from the rest of the application.

Alternatively we might hide everything apart from the graph roots and an optional list of "public" keys.

We should add a way to tell produce to respect private declarations and this should be on by default. There still may be situation when user might want to make everything public.

neko-kai commented 1 year ago

We might want to declare 'privateness' on memoization level itself, not on the module. So e.g. we want docker memoization level to not pass on Clock instance further, but we don't want Clock to be non-singleton on every single level of memoization.

lukoyanov commented 1 year ago

Sounds like a great feature 👍

neko-kai commented 3 days ago

Fixed in https://github.com/7mind/izumi/pull/2162