2.3.2-SNAPSHOT#66
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The single-JAR runtime load path (loadPlugin(File), used by pm load/reload) built the plugin classloader with only the core classloader as parent and never wired up its dependencies, so a plugin loaded at runtime could not see its (soft)dependency classes. Only the startup batch loader handled this. Delegate loadPlugin(File) to the shared instantiateAndLoad() so runtime loads get the same effective-dependency classloader chain as startup loading. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…untime unload Plugins a MetaPlugin (transitively) depends on now share its lifecycle restriction: they cannot be unloaded during runtime, since that would tear down the MetaPlugin's classloader chain. enableAll() also enables the MetaPlugin's dependencies (in dependency order) before the MetaPlugin itself. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The startup batch loader excludes plugins with missing hard dependencies via the topological sort, but the runtime path (pm load/reload) silently loaded them with the core classloader as parent, leaving a broken classloader chain. Refuse the load with the same dependency.missing message instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 42 |
| Duplication | 1 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codacy (PMD AvoidAccessibilityAlteration) flags setAccessible() calls scattered in test classes. Move the reflective access to Bot's private running/session fields into a single suppressed helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LoginFlowTest, LoginFlowRealWorldTest, ModpackTest and the two new plugin-dependency test classes were not in the hand-maintained matrix, so CI never ran them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Changes
feat(plugin): MetaPlugin dependencies (#unload protection & enable order)
pm unloadwhile the bot is running, since that would tear down the MetaPlugin's classloader chain.enableAll()enables the MetaPlugin's dependencies (in dependency order) before the MetaPlugin itself.xinbot.metaplugin.error.unload_dependency_runtimein all 7 languages.fix(plugin): wire (soft)dependency classloader chain on runtime load
loadPlugin(File)(used bypm load/pm reload) now delegates to the sharedinstantiateAndLoad(), so runtime loads get the same effective-dependency classloader chain as startup batch loading.fix(plugin): reject runtime load when a hard dependency is missing
Tests
MetaPluginDependencyTest(4 tests): unload protection, transitive protection, enable order, non-dependency plugins unaffectedPluginRuntimeSoftDependTest(3 tests): runtime soft-dep wiring, absent soft-dep ignored, missing hard dep rejected🤖 Generated with Claude Code