microsoft / microsoft/vscode-python-environments
More gracefully fail on `pyproject.toml` error
未关闭
还没有人认领这个 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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