gnodet commented on PR #13490: URL: https://github.com/apache/maven/pull/13490#issuecomment-6192969349
Thanks for the input, @rmannibucau. The API is explicitly `@Experimental`, so refinement is expected and welcome. That said, the world/realm model is intentional here rather than inherited clutter: 1. **Realm isolation is the core invariant** — a bare `ClassLoader` has no notion of a named, managed realm with controlled import/export relationships. Extensions already depend on realm identity (they call `ClassRealmManager` to look up realms by ID, import from specific realms, etc.). Exposing this through a simpler `ClassLoader`-alike would either lose those semantics or push the complexity somewhere else. 2. **`Strategy` is an extension point** — it controls load-order (self-first vs. import-first). Hiding it would make the API less powerful without reducing implementation complexity. 3. **Primary goal of this PR is internalization, not API design** — the API surface is the minimum needed to type-safely bridge the internalised impl to callers. It deliberately mirrors the existing classworlds contracts so extensions don't break. A redesign of the model itself is a separate, larger conversation. Happy to iterate on the API shape in a follow-up once the internalization lands. Is there a specific concept you'd drop or collapse? That would make the design conversation more concrete. -- 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]
