Repository navigation
Description
Running clippy for the web app's target stops at an error on main, and 12 more warnings show up only on that target. CI never sees either: its wasm step is a cargo check, not clippy. So every PR that runs clippy for wasm by hand reports the same lines as "already on main". About a dozen have done so since October: #1908, #1917, #4054, #4635, #5350, #5499, #6253, #6670, #6696, #7564, #7565, #8125 and #9654.
Reproduce
On main 9c93a6c, rustc and clippy 1.98.0:
cargo clippy -p solidcraft-web --target wasm32-unknown-unknown --profile ci -- -D warnings
error: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
--> crates\io\src\safe_write.rs:298:5
|
298 | drop(file);
| ^^^^^^^^^^
|
note: argument has type `std::fs::File`
--> crates\io\src\safe_write.rs:298:10
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#drop_non_drop
= note: `-D clippy::drop-non-drop` implied by `-D warnings`
error: could not compile `solidcraft-io` (lib) due to 1 previous error
On wasm32, std::fs::File is a stub with no Drop, so clippy's drop_non_drop fires. The line is in create_atomic, after its if cfg!(target_arch = "wasm32") { ... return } branch: the native path still compiles on wasm. The line moved over time (146, 162, 189, now 298), but the drop(file) is the same one, from #863.
The other warnings (same command, without -D warnings)
Without -D warnings clippy doesn't stop at solidcraft-io. It reports these, for wasm only (main 9c93a6c):
| Where | Warning |
|---|---|
crates/io/src/safe_write.rs:298 |
drop of a value with no Drop (the File above) |
crates/engine/src/control_auth.rs:310 |
drop of a value with no Drop |
crates/engine/src/cmd/file_easyprint.rs:21 |
field bodies is never read |
crates/engine/src/cmd/sketch_drag.rs:42 |
constant AHEAD is never used |
crates/ui-egui/src/dialogs_library.rs:2 |
unused import crate::dialogs_appearance::selected_params |
crates/ui-egui/src/file_load.rs:15 |
unused import solidcraft_engine::geom::prelude |
crates/ui-egui/src/home.rs:565 |
unused variable ctx |
crates/ui-egui/src/browser/point_cloud_tracks.rs:124 |
field asked is never read |
crates/ui-egui/src/deferred.rs:80 |
variant Later is never constructed |
crates/ui-egui/src/lib.rs:3079 |
a let-binding with unit value |
apps/solidcraft-web/src/files.rs:679 |
useless conversion to JsValue |
apps/solidcraft-web/src/install.rs:26, 28 |
useless conversion to JsValue (two) |
Thirteen in all: the error above and 12 more.
Most are code that only native builds use: an import, a field or a constant that a #[cfg(not(target_arch = "wasm32"))] path reads.
What would fix it
- Each line gets its own wasm-only fix: the native-only code behind
cfg, ordrop(file)replaced by the file going out of scope. - So that it stays fixed, CI's wasm job (or
cargo xtask wasm) could run clippy with-D warningsinstead of, or after,cargo check. That's a maintainer's call. Without it, the list grows back.
This isn't a security problem. It's lint noise that each web PR has to work around.
Activity
[-]Web app: clippy for wasm stops at a drop of a File in safe_write.rs, and 15 other warnings only that target shows[/-][+]Web app: clippy for wasm stops at a drop of a File in safe_write.rs, and 12 other warnings only that target shows[/+]github-actions commentedon Nov 5, 2026
Claimed by @thocsmith through #12251. The claim lapses after 14 days without pushes.
Web app: clippy for wasm passes with -D warnings (tangency-labs#12222)
Web app: clippy for wasm passes with -D warnings (tangency-labs#12222) (