pola-rs/polars · error
this tool requires the `dsl-schema` feature
Error message
this tool requires the `dsl-schema` feature
What it means
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.
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
Example fix
// before cargo build -p polars-plan // after cargo build -p polars-plan --all-features && ./target/debug/dsl-schema
Defensive patterns
Strategy: validation
Validate before calling
// shell: ensure feature-enabled build before running cargo build -p polars-plan --all-features && ./target/debug/dsl-schema --help
Prevention
- 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
When it happens
Trigger: Running the dsl-schema binary produced by cargo build without --features dsl-schema (or --all-features).
Common situations: 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.
Related errors
- activate 'binary_encoding' feature
- activate 'decompress' feature
- activate dtype-categorical to convert dictionary arrays
- activate object
- activate 'object' feature
AI-assisted analysis of pola-rs/polars@fe841f959e (2026-09-18).
Data as JSON: /api/errors/c0018fe7a8ed8347.
Report an issue: GitHub.
Appendix: source
Thrown at crates/polars-plan/src/bin/dsl-schema.rs:22
//! `dsl-schema [generate|update-hashes|check-hashes] [PATH]`
//! - `generate` the DSL schema as a full JSON file in the current directory
//! - `update-hashes` stored in the schema hashes file,
//! - `check-hashes` in the schema hashes file against the hashes from the code.
//!
//! The generated schema is affected by active features. To use a complete schema, first build
//! the whole workspace with all features:
//! ```sh
//! cargo build --all-features
//! ./target/debug/dsl-schema update-hashes
//! ./target/debug/dsl-schema check-hashes
//!
//! The tool has the code schema built-in. After code changes, you need to run
//! `cargo build --all-features` again.
//! ```
fn main() {
#[cfg(not(feature = "dsl-schema"))]
panic!("this tool requires the `dsl-schema` feature");
#[cfg(feature = "dsl-schema")]
{
impls::run();
}
}
#[cfg(feature = "dsl-schema")]
mod impls {
use std::fs::File;
use std::io::Write;
use std::path::Path;
use polars_plan::dsl::DslPlan;
use schemars::Schema;
use sha2::Digest;
const DEFAULT_HASHES_PATH: &str = "crates/polars-plan/dsl-schema-hashes.json";View on GitHub (pinned to fe841f959e)