{"record":{"id":"5f9dbd76c35749d4","repo":"jdx/mise","slug":"mise-prune-monorepo-is-not-implemented-yet","errorCode":null,"errorMessage":"mise prune --monorepo is not implemented yet","messagePattern":"mise prune --monorepo is not implemented yet","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/prune.rs","lineNumber":68,"sourceCode":"    pub dry_run_code: bool,\n\n    /// Placeholder for future monorepo pruning; `mise prune --monorepo` is not implemented yet.\n    #[clap(long, verbatim_doc_comment)]\n    pub monorepo: bool,\n\n    /// Prune only unused versions of tools\n    #[clap(long)]\n    pub tools: bool,\n}\n\nimpl Prune {\n    fn is_dry_run(&self) -> bool {\n        self.dry_run || self.dry_run_code\n    }\n\n    pub async fn run(self) -> Result<()> {\n        if self.monorepo {\n            unimplemented!(\"mise prune --monorepo is not implemented yet\");\n        }\n        let mut config = Config::get().await?;\n        if self.configs || !self.tools {\n            self.prune_configs()?;\n        }\n        if self.tools || !self.configs {\n            let backends = self\n                .installed_tool\n                .as_ref()\n                .map(|it| it.iter().map(|ta| ta.ba.as_ref()).collect());\n            let tools = backends.unwrap_or_default();\n            let to_delete = prunable_tools(&config, tools).await?;\n            let has_work = !to_delete.is_empty();\n            delete(&config, self.is_dry_run(), to_delete).await?;\n            if self.dry_run_code && has_work {\n                return Err(exit::request(1));\n            }\n            if self.is_dry_run() {","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/jdx/mise/blob/6bd4a54fadcdf3a6757cc44061a9528b48dd2ae7/src/cli/prune.rs#L50-L86","documentation":"`mise prune` accepts a `--monorepo` flag declared as a placeholder (src/cli/prune.rs:52-54: 'Placeholder for future monorepo pruning; mise prune --monorepo is not implemented yet'). The implementation does not exist, so `Prune::run` calls `unimplemented!()` at src/cli/prune.rs:68 the moment the flag is seen — a Rust panic that aborts before any config load, tracking-file read, or deletion planning happens. No pruning occurs, partial or otherwise.","triggerScenarios":"Running `mise prune --monorepo`. The check is the first statement in `run()`, so the command panics before `prune_configs()` or `prunable_tools()` execute; nothing is deleted and tracked-config state is untouched.","commonSituations":"Cleanup scripts or cron jobs written for a future mise that documents monorepo pruning; tab-completion or `mise prune --help` showing the flag (it is a real clap arg) inviting use; sharing dotfiles across mise versions where the flag parses but panics.","solutions":["Drop the flag and run `mise prune` from each repository root; pruning uses tracked configs (~/.local/state/mise/tracked-configs) so running it per project prunes that project's unused versions","Use `mise prune -n` (dry-run) first to confirm what would be deleted before running for real","Watch mise release notes and only adopt `--monorepo` in a version where it is implemented","In shared scripts, feature-detect instead of hardcoding the flag (e.g. parse `mise prune --help` output)"],"exampleFix":"# before\nmise prune --monorepo\n# after\nfor d in services/*/; do (cd \"$d\" && mise prune); done","handlingStrategy":"validation","validationCode":"# confirm the prune monorepo path exists before relying on it\nif mise prune --help 2>/dev/null | grep -q -- '--monorepo.*not implemented'; then\n  for d in services/*/; do (cd \"$d\" && mise prune -n); done  # dry-run per project\nelse\n  mise prune --monorepo\nfi","typeGuard":null,"tryCatchPattern":"# shell: prune per project when the flag panics\nout=$(mise prune --monorepo 2>&1)\nif [ $? -ne 0 ] && printf '%s' \"$out\" | grep -q 'not implemented yet'; then\n  for d in services/*/; do (cd \"$d\" && mise prune); done\nelse\n  printf '%s\\n' \"$out\"\nfi","preventionTips":["Feature-detect flags in cleanup scripts instead of assuming; the flag parsing successfully is not evidence it works","Always dry-run (`mise prune -n`) after changing prune automation to see exactly what would be deleted","Version-lock mise in cron/CI environments so a half-shipped flag can never surprise a scheduled job"],"tags":["mise","cli","prune","monorepo","unimplemented","flag"],"backgroundTag":"unimplemented-cli-flag","analyzedSha":"6bd4a54fadcdf3a6757cc44061a9528b48dd2ae7","analyzedAt":"2026-08-16T19:20:32.527Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}