UX: error on 'directory does not exist'

オープン
#234 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

@aozmekik がすでに取り組んでいます。

2026年10月26日 から。

  • #342 @aozmekik による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
cli

調査の方向性

chisel cut --release=./ --root=mych libgcc-14-dev_libs で問題を再現し、不足している mych ディレクトリのエラーがどのようにユーザーに伝わるかを追跡します。コマンドが mych を明示した、焦点の絞られたユーザーフレンドリーなエラーを報告し、base-files のエラー階層を露出させなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
434
フォーク
74
平均マージ
1日 30分
マージ済み PR(30日)
1

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

canonical/chisel のほかの issue

canonical/chisel の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。