{"record":{"id":"85b1da4ec5206cec","repo":"libnyanpasu/clash-nyanpasu","slug":"unimplemented","errorCode":null,"errorMessage":"unimplemented!()","messagePattern":"unimplemented!\\(\\)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"backend/tauri/src/enhance/script/runner.rs","lineNumber":45,"sourceCode":"    };\n}\n\npub(super) use wrap_result;\n\n#[async_trait]\npub trait Runner: Send + Sync {\n    fn try_new() -> Result<Self, Error>\n    where\n        Self: std::marker::Sized;\n    #[allow(dead_code)]\n    /// Process profiles by script file path\n    async fn process(&self, mapping: Mapping, path: &str) -> ProcessOutput;\n\n    /// Honey replacement - use in memory code str to load module and exec it!\n    /// It might not be implemented - due to some embeded engine is not support.\n    async fn process_honey(&self, mapping: Mapping, script: &str) -> ProcessOutput {\n        tracing::debug!(\"mapping: {:?}\\nscript:{}\", mapping, script);\n        unimplemented!()\n    }\n}\n\npub struct RunnerManager {\n    runners: HashMap<ScriptType, Box<dyn Runner>>,\n}\n\nimpl RunnerManager {\n    pub fn new() -> Self {\n        Self {\n            runners: HashMap::new(),\n        }\n    }\n    // If the script runner is not exist, it should be created.\n    pub fn get_or_init_runner(&mut self, script_type: &ScriptType) -> anyhow::Result<&dyn Runner> {\n        if !self.runners.contains_key(script_type) {\n            let runner = match script_type {\n                ScriptType::JavaScript => Box::new(js::JSRunner::try_new()?) as Box<dyn Runner>,","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/libnyanpasu/clash-nyanpasu/blob/f7dbce2997c633e484f54788035e770b3ee99773/backend/tauri/src/enhance/script/runner.rs#L27-L63","documentation":"Runner::process_honey is a default trait method for in-memory script execution ('honey' replacement) and is deliberately left unimplemented!() because some embedded engines cannot load-and-exec code from a string. Panics if a script type's runner does not override it but honey processing is requested.","triggerScenarios":"Enhance pipeline requests honey-style script processing on a runner that only implemented process() and inherited the default process_honey.","commonSituations":"Using a script (JS honey) enhancement with a script type/engine whose runner lacks an embedded exec-capable engine.","solutions":["Do not use honey-script enhancement with this script type; use the standard script mode","Implement process_honey for the runner's engine","Switch the script type to one whose runner supports honey execution"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if matches!(script_type, ScriptType::HoneyOnly) {\n  return Err(anyhow::anyhow!(\"honey scripts unsupported for this runner\"));\n}","typeGuard":null,"tryCatchPattern":"// process_honey panics rather than returning Result; guard at call site\nif runner.supports_honey() {\n  runner.process_honey(mapping, script).await\n} else {\n  ProcessOutput::default()\n}","preventionTips":["Only enable honey scripts for engines with in-memory exec support","Override process_honey in every new Runner implementation","Prefer returning a ProcessOutput error over inheriting unimplemented!()"],"tags":["rust","unimplemented","script-runner"],"backgroundTag":"method-not-implemented","analyzedSha":"f7dbce2997c633e484f54788035e770b3ee99773","analyzedAt":"2026-09-08T01:24:59.197Z","contentChangedAt":"2026-09-08T01:24:59.197Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}