Consider using an external argument parser

Offen
#97 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Refactoring
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
rust
Bereich
cli

Rechercherichtung

Beginne damit, die manuelle Argumentanalyse im diff-Befehl und im WIP-cmp-Befehl zu prüfen, und lies anschließend uutils/coreutils#4254 sowie die Dokumentation von uutils-args. Bewerte, ob uutils-args die Argumente von GNU diffutils nachbilden kann; für den Abschluss wären eine klare Kompatibilitätsbewertung sowie jegliches daraus resultierende Feedback oder Beiträge erforderlich.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Argument parsing in the diff command (and in the WIP cmp command) is implemented manually. The rationale for not using a general-purpose parser like clap is that it does not offer the flexibility we need to replicate the GNU diffutils arguments. We'd lose in compatibility what we would gain in code simplicity.

While researching how it's done in uutils/coreutils, I came across uutils/coreutils#4254, which looks especially relevant. Perhaps we should consider giving uutils-args a test run to understand if it fits the needs of the diffutils applications, and provide constructive feedback and contributions in case it doesn't.

There are currently only two CLI applications (out of a total of 4) to migrate, so the advantage over uutils/coreutils is that the effort would be rather limited.

Vorherrschende Sprache
Rust
Sterne
276
Forks
39
Ø Merge
3 Std. 27 Min.
Gemergte PRs (30 T.)
3

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus uutils/diffutils

Alle Issues in uutils/diffutils

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.