microsoft / microsoft/vscode-python-environments

More gracefully fail on `pyproject.toml` error

未關閉
#411 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

bug verified
主要語言
TypeScript
星號
138
分支
62
平均合併
1 天 4 小時
30 天內合併 PR
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. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 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 摘要。