This is an automated email from the ASF dual-hosted git repository. alamb pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push: new 87218a1e65 fix: Enable WASM compilation by making sqlparser's recursive-protection optional (#16418) 87218a1e65 is described below commit 87218a1e656f05da4c8374010b3ae550842606b8 Author: Jon Mease <jonmme...@gmail.com> AuthorDate: Tue Jun 17 18:52:09 2025 -0400 fix: Enable WASM compilation by making sqlparser's recursive-protection optional (#16418) * fix: Make sqlparser's recursive-protection optional for WASM compatibility This change addresses the PSM "section too large" error when building DataFusion for WebAssembly by making sqlparser's recursive-protection feature optional. Changes: - Set default-features = false for sqlparser in workspace Cargo.toml - Add sqlparser_std and sqlparser_recursive_protection features to datafusion crate - Include these features in datafusion's default features for backward compatibility This allows WASM builds to exclude the problematic dependency chain: sqlparser → recursive → stacker → psm While maintaining full compatibility for non-WASM builds. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <nore...@anthropic.com> * fix: Include std feature for sqlparser The std feature is required for sqlparser to compile properly. Without it, basic types and imports are missing. * review feedback --------- Co-authored-by: Claude <nore...@anthropic.com> --- Cargo.toml | 2 +- datafusion/core/Cargo.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 93d64cb6b6..f2cd6f72c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -167,7 +167,7 @@ recursive = "0.1.1" regex = "1.8" rstest = "0.25.0" serde_json = "1" -sqlparser = { version = "0.55.0", features = ["visitor"] } +sqlparser = { version = "0.55.0", default-features = false, features = ["std", "visitor"] } tempfile = "3" tokio = { version = "1.45", features = ["macros", "rt", "sync"] } url = "2.5.4" diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml index f3aa7b1e7c..6d4c18df3d 100644 --- a/datafusion/core/Cargo.toml +++ b/datafusion/core/Cargo.toml @@ -78,6 +78,7 @@ recursive_protection = [ "datafusion-optimizer/recursive_protection", "datafusion-physical-optimizer/recursive_protection", "datafusion-sql/recursive_protection", + "sqlparser/recursive-protection", ] serde = [ "dep:serde", --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org For additional commands, e-mail: commits-h...@datafusion.apache.org