UX: error on 'directory does not exist'

Aperta
#234 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@aozmekik ci sta già lavorando.

Dal 26/10/2026.

  • #342 di @aozmekik — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

Riproduci il problema con chisel cut --release=./ --root=mych libgcc-14-dev_libs e traccia come l'errore relativo alla directory mych mancante arriva all'utente. Il lavoro è completato quando il comando segnala un errore mirato e comprensibile per l'utente che nomina mych, invece di esporre la gerarchia degli errori di base-files.

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

Descrizione

The error message when attempting to cut into a directory (to make sure all the slice is correct) is a bit confusing. When running: chisel cut --release=./ --root=mych libgcc-14-dev_libs i get error: cannot extract from package "base-files": target directory does not exist which gives me the full error hierarchy and points towards something wrong with the base-files, while the actual issue is that the directory mych does not exist.

As a UX feedback; I'd suggest caching this case and creating a more user friendly error. At least I'd present just the bottom error, and maybe even add the directory name. Something like cannot cut into mych directory. it does not exist.

I imagine this kind of treatment might be appropriate for some other errors, therefore my suggestion for reporting errors to the user would be to:

  • allow the error to propagate to the topmost level normally - exactly as it is implemented at the moment
  • just before passing the error to the user, check whether it is a special error which can be made more user friendly.
    • Yes: report it like that
    • No: Report it using the

I'm thinking of something along the lines of github.com/pkg/errors used to do?

When I have some time I'm happy to look at the code and make a PR.

Lingua principale
Go
Stelle
434
Fork
74
Merge medio
1g 30m
PR unite (30g)
1

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 canonical/chisel

Tutte le issue di canonical/chisel

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.