hyperlight-dev / hyperlight-dev/hyperlight
Pin nightly rustfmt version to avoid cross-platform formatting inconsistencies
- Lingua principale
- Rust
- Stelle
- 4.7k
- Fork
- 208
- Merge medio
- 1g 7h
- PR unite (30g)
- 48
Descrizione
In #1324, we discovered that Linux and Windows CI runners had different `nightly` rustfmt versions installed, causing `just fmt-check` to fail with conflicting formatting expectations. Specifically, `nightly-2026-02-28` introduced a breaking change to how `use {crate1, crate2};` grouped imports are formatted (splitting them into separate `use` statements).
As a temporary fix, we pinned `nightly-2026-02-27` in the Justfile via a `nightly-toolchain` variable. This works but means we'll need to manually bump the pin when we want to pick up newer rustfmt features or when the pinned version becomes unavailable.
We should investigate a more permanent solution, such as:
- Pinning a nightly date in `rust-toolchain.toml` with a dedicated `nightly` profile for fmt
- Switching to stable rustfmt (if it covers our needs)
- Adding a `rustfmt.toml` option to explicitly control the import grouping behavior so it's resilient to upstream changes
- Setting up a recurring process/bot to bump the nightly pin intentionally
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la variabile nightly-toolchain di Justfile e la ricetta just fmt-check, quindi verifica se rust-toolchain.toml o rustfmt.toml definisce già il comportamento della formattazione. Confronta il fallimento descritto in #1324 su Linux e Windows e valuta le alternative elencate; il lavoro è completato quando un approccio intenzionale e documentato impedisce la deriva della formattazione tra piattaforme senza un pin manuale ad hoc.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- build-system, tooling
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100