LucaCappelletti94 opened a new pull request, #2343:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2343
Enabling the `visitor` feature without `std` (e.g. `default-features =
false, features = ["visitor"]` on `wasm32-unknown-unknown`) currently fails
with ~3200 errors. The `Visit` / `VisitMut` derive in `sqlparser_derive`
hard-codes `::std::ops::ControlFlow` in the generated impls, and
`src/ast/visitor.rs` references `String` / `Vec` / `Box` without importing them
from `alloc`, so neither path resolves once the crate root evaluates
`#![no_std]`.
This swaps both `::std::ops::ControlFlow` paths in `derive/src/visit.rs` for
`::core::ops::ControlFlow` (stable since 1.55; `std::ops::ControlFlow` is just
a re-export, so std builds are unaffected) and adds a cfg-gated `use
alloc::{boxed::Box, string::String, vec::Vec};` in `src/ast/visitor.rs`,
matching the convention already used in `src/ast/comments.rs`. The existing
`compile-no-std` CI job is extended with a `--features visitor` cargo check on
`thumbv6m-none-eabi` so this regression cannot land silently again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]