Pumpkin-MC/Pumpkin · error · ManagerError

Dependency error

Error message

Dependency error: {0}

What it means

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.

Solutions

  1. Install the missing dependency plugin or update the dependent plugin that requires it
  2. Align versions so the dependency satisfies the version constraint declared by the dependent plugin
  3. Read the message to see which plugin/version is unmet, and fix the plugins folder contents accordingly
  4. Remove or replace plugins whose dependency chains cannot be satisfied on this server version

Example fix

// plugins/MyPlugin requires libX >=2.0 but libX 1.4 installed
// before: plugins/ contains libX-1.4.jar
// after: download libX 2.x jar into plugins/ (or get a MyPlugin build targeting libX 1.x)
Defensive patterns

Strategy: validation

Validate before calling

// before enabling a plugin, verify its dependencies resolve
for dep in plugin.manifest().dependencies() {
    ensure!(
        manager.get_plugin(&dep.id).map(|p| p.version_satisfies(&dep.req)) == Some(true),
        "missing or incompatible dependency: {} {}", dep.id, dep.req
    );
}

Try / catch

match manager.enable_plugin(name) {
    Err(ManagerError::DependencyError(msg)) => {
        error!("cannot enable {name}: {msg}");
        // install/update the dependency named in msg, then retry
    }
    other => other?,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/7578727cadc828af. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin/src/plugin/mod.rs:225

    metadata: PluginMetadata,
    instance: Option<Arc<dyn Plugin>>,
    loader: Arc<dyn PluginLoader>,
    loader_data: Option<Box<dyn Any + Send + Sync>>,
    is_active: bool,
    context: Arc<Context>,
    path: PathBuf,
}

/// Error types for plugin management
#[derive(Error, Debug)]
pub enum ManagerError {
    #[error("Plugin not found: {0}")]
    PluginNotFound(String),
    #[error("Loader error: {0}")]
    LoaderError(#[from] LoaderError),
    #[error("IO error: {0}")]
    IoError(#[from] std::io::Error),
    #[error("Dependency error: {0}")]
    DependencyError(String),
}

impl Default for PluginManager {
    fn default() -> Self {
        Self::new(true)
    }
}

impl PluginManager {
    /// Create a new plugin manager with default loaders
    #[must_use]
    pub fn new(verify_plugin_signatures: bool) -> Self {
        Self {
            plugins: SyncRwLock::new(Vec::new()),
            loaders: RwLock::new(vec![
                Arc::new(NativePluginLoader),
                Arc::new(WasmPluginLoader::new(verify_plugin_signatures)),

View on GitHub (pinned to 8d4639e25a)