Improve `getResolvedSiteConfigPath` error message logic

オープン 初心者向け
#210 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
typescript
領域
build-system

調査の方向性

リンク先の行にある tools/webpack/utils/getResolvedSiteConfigPath.ts から始め、SITE_CONFIG_PATH と defaultPath がどのようにチェックされるかを追跡します。現在の動作を issue の表にある各ケースと比較し、選択されたパスとエラーメッセージがそれらの結果と一致することを確認します。

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

説明

When SITE_CONFIG_PATH is set but invalid, it silently falls through to try the default path instead of erroring immediately.

This means for the following flows:

SITE_CONFIG_PATH defined SITE_CONFIG_PATH exists defaultPath exists Result
✅ ✅ N/A No error. Site config path returned.
✅ ❌ ✅ No error. Default path returned.
✅ ❌ ❌ Error saying env var path is invalid, no mention of default path.
❌ ❌ ✅ No error. Default path returned.
❌ ❌ ❌ Error saying default path is invalid.

The main issue here is that the error messaging doesn't accurately reflect what's happening. No mention of falling back to the default path, and only showing the env var error message when both the env var path and the default path are invalid.

https://github.com/openedx/frontend-base/blob/d511970513aabcca86a9ae71c17c18779e9b514a/tools/webpack/utils/getResolvedSiteConfigPath.ts#L21-L26

主要言語
TypeScript
スター
4
フォーク
13
平均マージ
3日 5時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

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

openedx/frontend-base のほかの issue

openedx/frontend-base の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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