{"record":{"id":"7578727cadc828af","repo":"Pumpkin-MC/Pumpkin","slug":"dependency-error-0","errorCode":null,"errorMessage":"Dependency error: {0}","messagePattern":"Dependency error: (.+?)","errorType":"error_code","errorClass":"ManagerError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/plugin/mod.rs","lineNumber":225,"sourceCode":"    metadata: PluginMetadata,\n    instance: Option<Arc<dyn Plugin>>,\n    loader: Arc<dyn PluginLoader>,\n    loader_data: Option<Box<dyn Any + Send + Sync>>,\n    is_active: bool,\n    context: Arc<Context>,\n    path: PathBuf,\n}\n\n/// Error types for plugin management\n#[derive(Error, Debug)]\npub enum ManagerError {\n    #[error(\"Plugin not found: {0}\")]\n    PluginNotFound(String),\n    #[error(\"Loader error: {0}\")]\n    LoaderError(#[from] LoaderError),\n    #[error(\"IO error: {0}\")]\n    IoError(#[from] std::io::Error),\n    #[error(\"Dependency error: {0}\")]\n    DependencyError(String),\n}\n\nimpl Default for PluginManager {\n    fn default() -> Self {\n        Self::new(true)\n    }\n}\n\nimpl PluginManager {\n    /// Create a new plugin manager with default loaders\n    #[must_use]\n    pub fn new(verify_plugin_signatures: bool) -> Self {\n        Self {\n            plugins: SyncRwLock::new(Vec::new()),\n            loaders: RwLock::new(vec![\n                Arc::new(NativePluginLoader),\n                Arc::new(WasmPluginLoader::new(verify_plugin_signatures)),","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/mod.rs#L207-L243","documentation":"ManagerError::DependencyError(String) is a thiserror variant of the plugin manager's error enum, displayed as \"Dependency error: {0}\". It is returned when a plugin's declared dependencies cannot be satisfied — a required plugin is missing, or a version constraint does not match what is loaded. The String payload describes the unmet dependency.","triggerScenarios":"Loading/enabling a plugin that declares a dependency on a plugin that is not installed; dependency present but at an incompatible version; circular or unloadable dependency chains where a dependency fails to load first.","commonSituations":"Installing a plugin without its required companion plugin; mixing plugin versions where a library-style plugin was updated past what dependents declare; removing a shared dependency plugin while dependents remain installed.","solutions":["Install the missing dependency plugin or update the dependent plugin that requires it","Align versions so the dependency satisfies the version constraint declared by the dependent plugin","Read the message to see which plugin/version is unmet, and fix the plugins folder contents accordingly","Remove or replace plugins whose dependency chains cannot be satisfied on this server version"],"exampleFix":"// plugins/MyPlugin requires libX >=2.0 but libX 1.4 installed\n// before: plugins/ contains libX-1.4.jar\n// after: download libX 2.x jar into plugins/ (or get a MyPlugin build targeting libX 1.x)","handlingStrategy":"validation","validationCode":"// before enabling a plugin, verify its dependencies resolve\nfor dep in plugin.manifest().dependencies() {\n    ensure!(\n        manager.get_plugin(&dep.id).map(|p| p.version_satisfies(&dep.req)) == Some(true),\n        \"missing or incompatible dependency: {} {}\", dep.id, dep.req\n    );\n}","typeGuard":null,"tryCatchPattern":"match manager.enable_plugin(name) {\n    Err(ManagerError::DependencyError(msg)) => {\n        error!(\"cannot enable {name}: {msg}\");\n        // install/update the dependency named in msg, then retry\n    }\n    other => other?,\n}","preventionTips":["Read each plugin's dependency requirements before installing","Install dependency plugins first, in dependency order","Keep shared library-plugins updated together with their dependents","Never delete a dependency plugin while dependents remain installed"],"tags":["plugin-manager","dependency","thiserror"],"backgroundTag":"missing-dependency","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}