clockworklabs / SpacetimeDB

Multiplayer at the speed of light
https://spacetimedb.com
Other
4.41k stars 110 forks source link

CLI - Replace clippy with a manual check #1928

Open bfops opened 2 weeks ago

bfops commented 2 weeks ago

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 from 2m15s (with clippy) to 1m30s (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

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.