Repository navigation
refactor(jvm)!: move session contracts into the engine-neutral runtime - #335
Merged
oglassdev merged 2 commits intoOct 6, 2026
Merged
Conversation
SessionProvider<S>, ConfiguredSessionProvider<C, S>, SessionCreation, SessionMethodBinding<S, A, R>, the component bindings and the session, method and component registries now live in com.chunkzero.chunk.runtime, so generated code and the Gradle plugin target no engine types. Hosts mark the types they hand to session components with @Component.Supplied; multistom supplies SessionScope and requires its sessions to be multistom Sessions.
…supplied components
This was referenced Oct 6, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #334.
Summary
Generated code and the Gradle plugin no longer target any engine types, so the session, method and component machinery works for any host, not just multistom.
jvm/runtime(com.chunkzero.chunk.runtime):SessionProvider<S>,ConfiguredSessionProvider<C, S>,SessionCreation<C>,SessionMethodBinding<S, A, R>,SessionMethodProvider,ComponentBinding,ComponentProvider.SessionRegistry(loads providers, decodes configs),SessionMethodRegistryandComponentRegistry. An app on upstream Minestom can use them from its ownSessionHandler.@Component.Supplied: hosts mark the types they hand to session-scoped component factories. The plugin reads the marker from bytecode instead of hard-coding multistom'sSessionScope;BackendSessionstays built in.SessionScopeandBackendSession, and fails a session's creation if its provider doesn't create a multistomSession.implements ArenaSessionProviders.Koth<ArenaSession>, and plain providers implementSessionProvider<LobbySession>. Session method adapters are typed (new SessionMethodBinding<>(REF, ArenaSession.class, (session, args) -> session.status(args))).check-consumers.pyread thecom.chunkzero.chunk.runtime.*service files.Breaking changes
SessionProvider<S>/XSessionProviders.Y<S>.com.chunkzero.chunk.multistomtocom.chunkzero.chunk.runtime.chunkCLI and Gradle plugin, since the service file names changed.Notes
Session. multistom checks it when creating each session.Validation
./gradlew :jvm:runtime:test :jvm:multistom:test :jvm:multistom-kotlin:test :jvm:minestom:testjvm/gradle-plugintestscargo test -p chunk-build(codegen, release)examples/{local,arena,load}testClasseswith a rebuilt CLI, plusCoinCommandTestjust fmt-check🤖 Generated with Claude Code