microsoft / microsoft/vscode-python-environments

More gracefully fail on `pyproject.toml` error

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

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

bug verified
主要言語
TypeScript
スター
138
フォーク
62
平均マージ
1日 4時間
マージ済み PR(30日)
35

説明

tried going through the "create environment..." flow with a `pyproject.toml` file but I had an error since my `pyproject.toml` file was incorrectly formatted. Would be good if the error message was better or it failed more gracefully

```
Resolved Python Environment /Users/eleanorboyd/python-envs-scenarios/existing-env-folder/.venv/bin/python
2025-05-14 09:19:39.308 [info] Running: uv pip install --python /Users/eleanorboyd/python-envs-scenarios/existing-env-folder/.venv/bin/python -e /Users/eleanorboyd/python-envs-scenarios/existing-env-folder
2025-05-14 09:19:39.378 [info] error: Failed to extract static metadata from `pyproject.toml`
Caused by: TOML parse error at line 6, column 8
|
6 | name = "existing env folder"
| ^^^^^^^^^^^^^^^^^^^^^
Not a valid package or extra name: "existing env folder". Names must start and end with a letter or digit and may only contain -, _, ., and alphanumeric characters.

```

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

「create environment...」フローと、ログに記録された `uv pip install --python ... -e ...` の呼び出しから始め、壊れた `pyproject.toml` の例を使って失敗を再現します。フローがパッケージメタデータのエラーをより明確に報告するか、生の失敗を露出させずに正常に終了すれば完了です。

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

評価

技術スタック
python, typescript
領域
developer-experience, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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