gnodet commented on issue #13223:
URL: https://github.com/apache/maven/issues/13223#issuecomment-6293014257

   _Claude Code on behalf of Guillaume Nodet_
   
   Updated Layer 0b, Design Principle, and Component Map to reflect design 
discussion. Key changes:
   
   1. **Single `Realm` interface** — `classLoader()` + `moduleLayer()` + 
`lookup()`, used uniformly at all levels: `session.realm()`, `project.realm()`, 
`plugin.realm()`. Replaces the previous `PluginRealm`-only design. Module 
layers are not plugin-specific (extensions and core can also use them).
   
   2. **Dropped `@ProjectScoped`** — the project realm's injector lifecycle is 
the scope boundary. A scope annotation would require per-thread binding for 
concurrent builds — TCCL under a different name.
   
   3. **Composed Lookups, not parent/child injectors** — plugin realms do not 
inherit project components. Each realm's `lookup()` is composed from explicit 
sources, matching classloader import semantics.
   
   4. **Component import/export** — `exportedComponents` in `extension.xml` 
parallel to `exportedPackages`; `requiredExtensions` in `plugin.xml` bridges 
both class and component visibility. Project-level import is implicit via 
`<build><extensions>`.
   
   5. **Explicit context passing replaces TCCL** — 
`project.realm().lookup().lookup(PackagingRegistry.class).require(id)` instead 
of TCCL swap + global lookup.
   
   6. **PR #13625 alignment** — `PluginRealm` from #13625 should be renamed to 
`Realm` and generalized. Its TCCL-based `RealmLookup` is a correct transitional 
implementation.
   
   7. **Added #13570 to related issues** — tactical TCCL-based fix that will be 
superseded by Layer 0b realm Lookups.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to