style: cargo fmt backlog from the CI-allowlist outage#5260
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughIntroduces import-resolution and module-classification helpers ( ChangesImport Helper Utilities
Module Collection Integration
rustfmt Reflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
cargo fmt --all over 12 files that merged unformatted on main while the Tests workflow was in startup_failure (the sccache action #5221 wasn't on the repo's allowed-actions list, so every Tests run failed at startup and the lint gate never ran). Pure rustfmt reflow, semantics-preserving.
a772b16 to
81ba789
Compare
…ules collect_modules.rs was 2002 lines — 2 over the lint file-size cap (it crossed the line during the CI-allowlist outage when the gate wasn't running). Move the cohesive import-helper cluster (env_defines_for_lowering, collect_js_module_imports, ResolvedImport + the cached_resolve_*/ source_visible_resolved_path resolvers, known_node_submodule_key) into a new collect_modules/import_helpers.rs submodule. Pure code-move, no behavior change; collect_modules.rs is now 1787 lines. 25 collect_modules tests pass.
What
cargo fmt --allover 12 files that landed unformatted onmainduring the CI-allowlist outage this morning. Pure rustfmt reflow — semantics-preserving (mostly wrapping longcrate::UnimplementedDecision::DeferToRuntimeError(…)match arms). Code-only; no version bump / changelog (maintainer to fold in at merge).Why
The
Testsworkflow was instartup_failurefrom ~02:43 UTC on 2026-06-16:ci(test): add sccache(#5221) referencedmozilla-actions/sccache-action, which wasn't on the repo's selected allowed-actions list, so everyTestsrun failed at startup before any job — includinglint— could run. Several PRs (#5206, #5230, #5235, …) squash-merged in that window with unformatted Rust, makingcargo fmt --all -- --checkfail on the merge ref of every open PR (e.g. #5250) even when the PR head was clean.The allowlist was fixed separately (
mozilla-actions/sccache-action@*added), restoringTestsstartup.Note — separate blocker
lintalso has a File size limit step (2000-line cap).crates/perry/src/commands/compile/collect_modules.rsis 2002 lines onmain(also merged unformatted/oversized during the outage) and trips it. That's independent of formatting and needs its own fix (split the file or allowlist it) — not included here.Summary by CodeRabbit
New Features
node:submodules via a minimal runtime surface.Refactor
Tests
Style