netwatch: chrono is built on Windows but never used

Aperta
#280 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
33/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

In the Windows-specific netwatch dependency setup, remove the direct chrono version line and disable wmi's default features as described. Start by reading the netwatch Cargo.toml entries and check the existing draft pull request for the proposed two-line change. Done when the Windows-target cargo check passes and cargo tree --target all -i chrono shows no compiled dependency path.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On Windows, netwatch depends on wmi with default features, which pulls in chrono, plus a direct chrono = "0.4.23" line that only pins a minimum version. netwatch reads one string field from WMI (the default route's interface name) and never touches a date type. Seen on netwatch 0.20.2 and on main at 40fc258.

chrono is now flagged unmaintained (RUSTSEC-2026-0543), and you already ignore that in deny.toml. Dropping the direct line and using wmi with default-features = false stops it from being built. The change is two lines and waits here as a draft: https://github.com/irsync-dev/net-tools/pull/1

With it, cargo check -p netwatch --target x86_64-pc-windows-msvc --all-targets passes and cargo tree --target all -i chrono is empty. chrono stays in Cargo.lock as an optional dependency of wmi, but nothing compiles it.

#226 would make this moot by removing WMI altogether, but this is small and could land first. Happy to send the PR if you want it.

Lingua principale
Rust
Stelle
34
Fork
56
Merge medio
2g 4h
PR unite (30g)
8

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di n0-computer/net-tools

Tutte le issue di n0-computer/net-tools

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.