Skip to content

Comments

Make more informative warning message when failed to parse pyproject.toml#6009

Merged
charliermarsh merged 2 commits intoastral-sh:mainfrom
flyaroundme:better-error-message-on-pyproject-toml-parsing
Aug 11, 2024
Merged

Make more informative warning message when failed to parse pyproject.toml#6009
charliermarsh merged 2 commits intoastral-sh:mainfrom
flyaroundme:better-error-message-on-pyproject-toml-parsing

Conversation

@flyaroundme
Copy link
Contributor

@flyaroundme flyaroundme commented Aug 11, 2024

Summary

Added the actual error message to the warning when uv fails to parse pyproject.toml.

Resolves #5934

Test Plan

Took the case from the issue:

  • have pyproject.toml which contains
[tool.uv]
foobar = false
$ uv venv --preview -v
  • Expect the message that contains the actual problem in the pyproject.toml like:
warning: Failed to parse `pyproject.toml` during settings discovery: unknown field `foobar`; skipping...

@charliermarsh charliermarsh self-assigned this Aug 11, 2024
@charliermarsh charliermarsh added the error messages Messaging when something goes wrong label Aug 11, 2024
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good idea. I just indented the error.

@charliermarsh charliermarsh enabled auto-merge (squash) August 11, 2024 21:07
@charliermarsh charliermarsh merged commit 798cc7b into astral-sh:main Aug 11, 2024
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 15, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.2.35` -> `0.2.36` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.2.36`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0236)

[Compare Source](astral-sh/uv@0.2.35...0.2.36)

##### Bug fixes

-   Use consistent canonicalization for URLs ([#&#8203;5980](astral-sh/uv#5980))
-   Improve warning message when parsing `pyproject.toml` fails ([#&#8203;6009](astral-sh/uv#6009))
-   Improve handling of overlapping markers in universal resolver ([#&#8203;5887](astral-sh/uv#5887))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error messages Messaging when something goes wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure to parse pyproject.toml doesn't come with error even in verbose mode

2 participants