Skip to content

Commit ddd8853

Browse files
committed
fix: GitHub Actions CI workflow issues
- Remove cargo fix/clippy --fix from CI (CI should check, not modify) - Remove --all-features from cargo check (Windows-only features fail on Linux) - Fix non-Windows code path in uffs_mft main.rs (use anyhow::bail! directly)
1 parent 48270f3 commit ddd8853

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

β€Ž.github/workflows/optimized-ci.ymlβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,8 @@ jobs:
105105
with:
106106
components: rustfmt, clippy
107107

108-
- name: Compiler & edition clean-ups (enhanced scope)
109-
run: cargo fix --workspace --all-targets --edition-idioms --allow-dirty --broken-code
110-
111-
- name: Apply every machine-safe Clippy suggestion (proven workflow)
112-
run: cargo clippy --fix --workspace --allow-dirty --allow-staged -- -D warnings -D clippy::pedantic -D clippy::nursery -D clippy::cargo -A clippy::multiple_crate_versions
108+
# NOTE: We don't run `cargo fix` or `cargo clippy --fix` in CI.
109+
# CI should only CHECK code, not modify it. Fixes are done locally.
113110

114111
- name: Check formatting
115112
run: cargo fmt --all -- --check
@@ -152,7 +149,10 @@ jobs:
152149
- name: Quick compilation check (no linking)
153150
run: |
154151
echo "πŸ” Quick sanity check - cargo check only..."
155-
cargo check --workspace --all-features --all-targets
152+
# NOTE: We don't use --all-features because some features are Windows-only.
153+
# The Windows-specific code is gated with #[cfg(windows)] and won't compile on Linux.
154+
# We check the workspace without platform-specific features.
155+
cargo check --workspace --all-targets
156156
echo "βœ… Sanity check passed - no catastrophic compilation failures"
157157
158158
# ═══════════════════════════════════════════════════════════════════════════

β€Žcrates/uffs-mft/src/main.rsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ async fn main() -> Result<()> {
102102
};
103103
tracing_subscriber::fmt().with_env_filter(filter).init();
104104

105-
// Check platform
105+
// Platform check - this tool only works on Windows
106106
#[cfg(not(windows))]
107107
{
108-
bail!(
108+
anyhow::bail!(
109109
"uffs_mft only works on Windows.\n\
110110
It requires direct access to the NTFS Master File Table via Windows APIs."
111111
);

0 commit comments

Comments
Β (0)