Skip to content

feat(spawn-application): migrate launcher discovery to ServiceLoader#25

Merged
deer merged 1 commit intomainfrom
services
May 1, 2026
Merged

feat(spawn-application): migrate launcher discovery to ServiceLoader#25
deer merged 1 commit intomainfrom
services

Conversation

@deer
Copy link
Copy Markdown
Collaborator

@deer deer commented May 1, 2026

  • Replaces the custom META-INF properties file parser in AbstractTemplatedPlatform with standard ServiceLoader + JPMS provides/uses wiring, eliminating ~100 lines of brittle classpath-scanning and string-parsing code.
  • Introduces LauncherRegistration — a typed service interface that associates a Launcher class with a specific Application and AbstractTemplatedPlatform type; discovered at runtime via ServiceLoader.
  • Migrates spawn-local-platform and spawn-local-jdk to the new mechanism with LocalLauncherRegistration and LocalJDKLauncherRegistration records, deleting the corresponding META-INF properties files.
  • Fixes raw Launcher types throughout: LauncherRegistration.launcherClass() and the internal launchers map now use Class<? extends Launcher<?, ?>>, removing all @SuppressWarnings("rawtypes") in favour of one targeted @SuppressWarnings("unchecked") at the unavoidable type-erased cast site.

@deer deer merged commit a3e0feb into main May 1, 2026
1 check passed
@deer deer deleted the services branch May 1, 2026 08:43
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.

1 participant