{"record":{"id":"fff625699e60f330","repo":"clockworklabs/SpacetimeDB","slug":"found-err-count-disallowed-print-statement-s-t","errorCode":null,"errorMessage":"Found {err_count} disallowed print statement(s).\nThese will not be printed from SpacetimeDB modules.\nIf you need to print something, use the `log` crate\nand the `log::info!` macro instead.","messagePattern":"Found (.+?) disallowed print statement\\(s\\)\\.\nThese will not be printed from SpacetimeDB modules\\.\nIf you need to print something, use the `log` crate\nand the `log::info!` macro instead\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/tasks/rust.rs","lineNumber":68,"sourceCode":"                let file = fs::File::open(file.path())?;\n                for (idx, line) in io::BufReader::new(file).lines().enumerate() {\n                    let line = line?;\n                    let line_number = idx + 1;\n                    for disallowed in &[\"println!\", \"print!\", \"eprintln!\", \"eprint!\", \"dbg!\"] {\n                        if line.contains(disallowed) {\n                            if err_count == 0 {\n                                eprintln!(\"\\nDetected nonfunctional print statements:\\n\");\n                            }\n                            eprintln!(\"{printable_path}:{line_number}: {line}\");\n                            err_count += 1;\n                        }\n                    }\n                }\n            }\n        }\n        if err_count > 0 {\n            eprintln!();\n            anyhow::bail!(\n                \"Found {err_count} disallowed print statement(s).\\n\\\n                These will not be printed from SpacetimeDB modules.\\n\\\n                If you need to print something, use the `log` crate\\n\\\n                and the `log::info!` macro instead.\"\n            );\n        }\n    } else {\n        println!(\n            \"Warning: Skipping checks for nonfunctional print statements.\\n\\\n            If you have used builtin macros for printing, such as println!,\\n\\\n            your logs will not show up.\"\n        );\n    }\n\n    let mut args = if let Some(features) = features {\n        vec![format!(\"--features={}\", features.to_string_lossy())]\n    } else {\n        vec![]","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/tasks/rust.rs#L50-L86","documentation":"Error \"Found {err_count} disallowed print statement(s).\nThese will not be printed from SpacetimeDB modules.\nIf you need to print something, use the `log` crate\nand the `log::info!` macro instead.\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/cli/src/tasks/rust.rs:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}