Summary
Location: paper/.../PluginLifecycleServiceImpl.kt (lines 196-252)
The remove(name) method performs no check for reverse dependencies. If Plugin A depends on Plugin B, removing Plugin B will leave Plugin A in a broken state.
The codebase already has getPluginsSyncingTo() in MpmConfigExtensions.kt which could be used for this check, but it's not called during removal.
Current flow:
- Load mpm.json
- Fire removal event
- Remove plugin from mpm.json
- Save file
Expected flow:
- Load mpm.json
- Check reverse dependencies (plugins depending on target)
- If dependents exist, block removal unless
--force flag is provided
- Fire removal event
- Remove plugin from mpm.json
- Save file
Suggested Fix
Before removing a plugin, call getPluginsSyncingTo() or implement a reverse dependency check using DependencyAnalyzer. Without --force, refuse removal when other managed plugins depend on it.
Impact
- Server administrators can accidentally break their server by removing a dependency
Summary
Location:
paper/.../PluginLifecycleServiceImpl.kt(lines 196-252)The
remove(name)method performs no check for reverse dependencies. If Plugin A depends on Plugin B, removing Plugin B will leave Plugin A in a broken state.The codebase already has
getPluginsSyncingTo()inMpmConfigExtensions.ktwhich could be used for this check, but it's not called during removal.Current flow:
Expected flow:
--forceflag is providedSuggested Fix
Before removing a plugin, call
getPluginsSyncingTo()or implement a reverse dependency check usingDependencyAnalyzer. Without--force, refuse removal when other managed plugins depend on it.Impact