{"record":{"id":"c0018fe7a8ed8347","repo":"pola-rs/polars","slug":"this-tool-requires-the-dsl-schema-feature","errorCode":null,"errorMessage":"this tool requires the `dsl-schema` feature","messagePattern":"this tool requires the `dsl-schema` feature","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-plan/src/bin/dsl-schema.rs","lineNumber":22,"sourceCode":"//! `dsl-schema [generate|update-hashes|check-hashes] [PATH]`\n//! - `generate` the DSL schema as a full JSON file in the current directory\n//! - `update-hashes` stored in the schema hashes file,\n//! - `check-hashes` in the schema hashes file against the hashes from the code.\n//!\n//! The generated schema is affected by active features. To use a complete schema, first build\n//! the whole workspace with all features:\n//! ```sh\n//! cargo build --all-features\n//! ./target/debug/dsl-schema update-hashes\n//! ./target/debug/dsl-schema check-hashes\n//!\n//! The tool has the code schema built-in. After code changes, you need to run\n//! `cargo build --all-features` again.\n//! ```\n\nfn main() {\n    #[cfg(not(feature = \"dsl-schema\"))]\n    panic!(\"this tool requires the `dsl-schema` feature\");\n\n    #[cfg(feature = \"dsl-schema\")]\n    {\n        impls::run();\n    }\n}\n\n#[cfg(feature = \"dsl-schema\")]\nmod impls {\n    use std::fs::File;\n    use std::io::Write;\n    use std::path::Path;\n\n    use polars_plan::dsl::DslPlan;\n    use schemars::Schema;\n    use sha2::Digest;\n\n    const DEFAULT_HASHES_PATH: &str = \"crates/polars-plan/dsl-schema-hashes.json\";","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/crates/polars-plan/src/bin/dsl-schema.rs#L4-L40","documentation":"The dsl-schema binary is only functional when built with the dsl-schema feature; without it the tool cannot generate/verify DSL schema hashes and errors out, directing the user to rebuild the workspace with that (or all) features enabled.","triggerScenarios":"Running the dsl-schema binary produced by cargo build without --features dsl-schema (or --all-features).","commonSituations":"Following the documented workflow (rebuild with cargo build --all-features after code changes) but building with default features; CI caching an old binary without the feature.","solutions":["Rebuild with cargo build -p polars-plan --all-features","Run the binary from the target dir produced by the feature-enabled build","Ensure CI rebuilds after feature or code changes rather than reusing cached default builds"],"exampleFix":"// before\ncargo build -p polars-plan\n// after\ncargo build -p polars-plan --all-features && ./target/debug/dsl-schema","handlingStrategy":"validation","validationCode":"// shell: ensure feature-enabled build before running\ncargo build -p polars-plan --all-features && ./target/debug/dsl-schema --help","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build tool binaries with --all-features per the documented workflow","Invalidate CI caches when feature flags change","Document the required feature next to run instructions"],"tags":["feature-flag","cli","build","dsl-schema"],"backgroundTag":"feature-not-enabled","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}