Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1968: locator-private bindings #2162

Merged
merged 12 commits into from
Aug 13, 2024
Merged

Conversation

pshirshov
Copy link
Member

@pshirshov pshirshov commented Aug 7, 2024

This P/R introduces the concept of Locator-private bindings.
Locator-local instances cannot be seen by inherited locators.
There are 3 supported modes:

  1. All the bindings are public unless explicitly marked as confined (the old behavior, kept as the default one)
  2. All the bindings are private unless explicitly marked as exposed
  3. Only GC roots are public

For bootstrap injectors the default behavior is (3). Also, from now on the bootstrap planning uses predefined set of roots instead of Roots.Everything, so bootstrap context are subjected to garbage colleciton.

THIS CHANGE IS INCOMPATIBLE WITH PREVIOUS VERSIONS and requires manual intervention if you have any custom bootstrap modules in your code.

All the bootstrap entities which you need to be available in the downstream locators, must be explicitly marked as exposed. There is no way to define GC roots for the bootstrap injector, so it considers all the exposed entities in bootstrap modules to be roots.

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 74.54545% with 28 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop@d04afdd). Learn more about missing BASE report.
Report is 8 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2162   +/-   ##
==========================================
  Coverage           ?   66.45%           
==========================================
  Files              ?      591           
  Lines              ?    11498           
  Branches           ?     1335           
==========================================
  Hits               ?     7641           
  Misses             ?     3857           
  Partials           ?        0           

@pshirshov pshirshov force-pushed the feature/1968-private-bindings branch from d050982 to e0d32e5 Compare August 8, 2024 17:34
@pshirshov pshirshov requested a review from Caparow August 8, 2024 17:36
@pshirshov pshirshov changed the title #1968: private bindings PoC #1968: locator-private bindings Aug 8, 2024
@pshirshov pshirshov marked this pull request as ready for review August 9, 2024 14:21
@neko-kai neko-kai merged commit f8d21be into develop Aug 13, 2024
33 checks passed
@neko-kai neko-kai deleted the feature/1968-private-bindings branch August 13, 2024 17:05
@neko-kai neko-kai mentioned this pull request Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants