Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Use core's blob fetch-summary formatter in apply's fetch_stage instead of a drifted copy

Offen Anfängerfreundlich
#1,838 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Refactoring
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
cli

Rechercherichtung

Lies crates/socket-patch-cli/src/commands/fetch_stage.rs zusammen mit den Core-Formatierern in crates/socket-patch-core/src/api/blob_fetcher.rs; repair wird als bestehender Aufrufer angeführt. Aktualisiere die Fetch-Stage so, dass sie die Core-Formatierer für Erfolg und Fehler verwendet und dabei ihre Zeile total == 0 beibehält. Aktualisiere anschließend die genannten fetch_stage- und apply_render-Tests. Fertig ist die Änderung, wenn die Erfolgsausgabe unverändert bleibt und die Fehlerausgabe dem sortierten, knappen Format des Core ohne abschließenden Doppelpunkt entspricht.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

agent:triaged arch-audit priority:p3 refactor

[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register comment.

Kind: refactor. Register ID: T04.

Problem

Two private functions in fetch_stage.rs L77-L128,`` format_fetch_summary and `format_fetch_failures`, copy the public formatters in core: `api/blob_fetcher.rs` L210-L264 (`format_fetch_result_for`, `format_fetch_successes`, `format_fetch_failures`). `repair` already uses the core ones.

The copies have drifted:

core fetch_stage
failures sorted by hash yes (results come from a HashSet) no, so the order is nondeterministic
header Failed to download N blobs Failed to download N blobs:
id noun.display_id (no ... for ids of 12 chars or fewer) always chars().take(12) + ...
error text concise_fetch_error raw error

"All blobs are present locally." and the ... and N more cap are written in both copies. The cap is also open-coded in fetch_stage::format_purl_list (L77-L83) and in repair.rs.

Proposed change

  • Delete fetch_stage::format_fetch_summary and format_fetch_failures.
  • Call blob_fetcher::format_fetch_successes / format_fetch_failures with ArtifactNoun blobs, keeping the total == 0 line.

Size

1 file. About −45 / +5 lines.

Acceptance criteria

  • apply prints the same success lines.
  • Failure lines take core's form: sorted, concise, and without the trailing colon.
  • fetch_stage and apply_render tests are updated where they pinned the old form.
Vorherrschende Sprache
Rust
Sterne
8
Forks
2
Ø Merge
19 Std. 12 Min.
Gemergte PRs (30 T.)
709

Entwicklungsumgebung

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 SocketDev/socket-patch

Alle Issues in SocketDev/socket-patch

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

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