Description
Now that substrait explain has the logic to parse custom proto using their descriptor sets, embed-descriptor should be a feature on the substrait import. Substrait-explain unconditionally uses substrait::proto::FILE_DESCRIPTOR_SET at runtime — a constant that only exists when the embed-descriptor feature is enabled on the substrait crate. Substrait-explain's declares substrait as a dependency without that feature.
How this bug was missed
embed-descriptor is only enabled as part of the cli feature, and substrait-explain's own workspace enables cli by default. The bug manifests specifically when a downstream user depends on substrait-explain with default-features = false and doesn't include cli.
Summary
substrait-explain should move substrait/embed-descriptor out of the cli feature and into an unconditional dependency, since FILE_DESCRIPTOR_SET is used in the core library regardless of whether the CLI is enabled. This prevents user excluding the cli feature from failing to build and having to add the dependency themselves.
The Fix
in substrait-explain's Cargo.toml:
[dependencies]
substrait = { version = "...", features = ["embed-descriptor"] }
Description
Now that substrait explain has the logic to parse custom proto using their descriptor sets, embed-descriptor should be a feature on the substrait import. Substrait-explain unconditionally uses
substrait::proto::FILE_DESCRIPTOR_SETat runtime — a constant that only exists when the embed-descriptor feature is enabled on the substrait crate. Substrait-explain's declares substrait as a dependency without that feature.How this bug was missed
embed-descriptoris only enabled as part of the cli feature, and substrait-explain's own workspace enables cli by default. The bug manifests specifically when a downstream user depends on substrait-explain with default-features = false and doesn't include cli.Summary
substrait-explain should move substrait/embed-descriptor out of the cli feature and into an unconditional dependency, since FILE_DESCRIPTOR_SET is used in the core library regardless of whether the CLI is enabled. This prevents user excluding the cli feature from failing to build and having to add the dependency themselves.
The Fix
in substrait-explain's Cargo.toml: