DioxusLabs / DioxusLabs/dioxus
CLI: `dx check` panics on compilation errors but reports "No issues found" and exits 0
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Environment
- **dx version:** 0.7.0-rc.0 (a519fba)
- **rustc:** 1.89.0 (29483883e 2025-08-04)
- **OS:** macOS 14.5.0 (Darwin 24.5.0 arm64)
## Description
When running `dx check` on a real project with a compilation error, it panics but still reports "No issues found" and exits with code 0 (success). This is misleading because you'd expect `dx check` to report compilation errors, similar to `cargo check`.
## Reproduction
In any Dioxus project, introduce a syntax error in a source file:
```rust
// src/app.rs
pub mod stores {
pub mod site_context {
pub use crate::SiteContextState;
let invalid syntax here // Invalid Rust syntax
}
}
```
Then run:
```bash
dx check
echo "Exit code: $?"
```
## Actual Output
```
[ 0.415s] ERROR Thread tokio-runtime-worker panicked at packages/check/src/check.rs:29:46:
called `Result::unwrap()` on an `Err` value: Error("expected one of: `fn`, `extern`, `use`, `static`, `const`, `unsafe`, `mod`, `type`, `struct`, `enum`, `union`, `trait`, `auto`, `impl`, `default`, `macro`, identifier, `self`, `super`, `crate`, `::`") telemetry={"event":"Captured Panic"} backtrace=...
[ 0.417s] ERROR error checking file: /Users/.../src/app.rs
[ 0.417s] INFO No issues found.
Exit code: 0
```
## Expected Behavior
Similar to `cargo check`, `dx check` should:
- Report compilation errors clearly without panicking
- Exit with non-zero code when compilation fails
- Display "No issues found" only when there are actually no issues
## Impact
This is misleading in several scenarios:
1. **Manual workflow:** Developer runs `dx check` to verify code, sees "No issues found", assumes code is fine
2. **CI/CD pipelines:** Automated checks pass (exit code 0) despite compilation errors
3. **AI tools:** Parse output and see "No issues found" despite panic messages
4. **Pre-commit hooks:** Won't block commits with compilation errors
The contradiction between the panic message and "No issues found" + exit 0 makes the tool unreliable for automated workflows.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.