feat: native hotswap agent, multi-plugin dev server, descriptor commands/depend#44
Merged
Conversation
…ommands/depend Replace the HotswapAgent/JBR extraClasspath approach with an embedded JVM agent, and grow the dev/build pipeline to match: - Embedded hotswap agent (agent/ Java sources compiled + base64-embedded via agent/build.ts) that pluggy drives over a nonce-authenticated loopback control socket; redefineClasses distinguishes reloaded/pending/nochange. - Multi-plugin suite dev server: `pluggy dev` at a workspace root runs every shipping plugin on one server, hotswapping each independently (one agent, one root per plugin). - `--debug` JDWP support, bound to loopback by default; `--debug-expose` opts into all-interfaces for the container/WSL2 case. - Bukkit descriptor now emits `commands:` and derives `depend:` from `workspace:` deps, so a plugin that links a sibling gets correct load order and classloader access without shading. - Platform API classpath disk cache keyed by (platform, version, CLI_VERSION) so an upgrade that changes resolution can't serve a stale classpath. BREAKING CHANGE: a workspace with no `main` is now a build error. Shared code must be its own plugin that others depend on (Java isolates plugin classloaders, so shading a library into two plugins duplicates its state); "library" workspaces are no longer supported.
Add the comments convention (default to none; keep only contract docs, non-obvious rationale, and TODOs) and fold it into the conventions list.
CLI_VERSION moved out of src/index.ts into a leaf module; point the release workflow's sed (and its grep guard) at the new location so tagged builds report the real version instead of 0.0.0.
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.
Summary
extraClasspathapproach with an embedded JVM agent (agent/Java sources, base64-embedded viaagent/build.ts) that pluggy drives over a nonce-authenticated loopback control socket;redefineClassesreports reloaded/pending/nochange.pluggy devat a workspace root now runs every shipping plugin on one server, hotswapping each independently (one agent, one root per plugin).--debug(JDWP) bound to loopback by default, with--debug-exposeopting into all-interfaces for containers/WSL2.commands:and derivesdepend:fromworkspace:deps, and the platform API classpath is cached on disk keyed by(platform, version, CLI_VERSION).mainis now a build error — shared code must be its own plugin others depend on (Java isolates plugin classloaders, so shading a library into two plugins duplicates its state); "library" workspaces are gone.Test plan
vp test(671 passed, 4 skipped — includes a real-JVM agent redefine test)vp lint/vp check(clean)bun --compilebinary; drove a multi-plugin suite inplayground/— core loads first via the deriveddepend, economy+homes enable on one server, each hotswaps independently,/balanceetc. registered from generatedcommands:, noNoClassDefFoundError.