[x] Manually added a println! to new module and observed that spacetime build produces an error:
$ spacetime build
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
Detected nonfunctional print statements:
./src/lib.rs:30: println!("Hello world");
Error: Found 1 disallowed print statement(s).
These will not be printed from SpacetimeDB modules.
If you need to print something, use the log crate
and the log::info! macro instead.
Description of Changes
We were apparently only using clippy to check for nonfunctional print statements (https://github.com/clockworklabs/SpacetimeDB/issues/1819).
This PR replaces our use of clippy (when building modules) with a manual check for disallowed print statements.
For me, this reduced the time of
cargo clean && time spacetime build
from2m15s
(with clippy) to1m30s
(without clippy).API and ABI breaking changes
Not breaking.
Expected complexity level and risk
2
Future work
The other items in https://github.com/clockworklabs/SpacetimeDB/issues/1819.
Testing
println!
to new module and observed thatspacetime build
produces an error:Detected nonfunctional print statements:
./src/lib.rs:30: println!("Hello world");
Error: Found 1 disallowed print statement(s). These will not be printed from SpacetimeDB modules. If you need to print something, use the
log
crate and thelog::info!
macro instead.