Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove serde(flatten) to improve error messages #1616

Merged
merged 1 commit into from
May 18, 2023

Conversation

konstin
Copy link
Member

@konstin konstin commented May 18, 2023

Apparently toml (or serde) fails to generate spans when using #[serde(flatten)].

New error message for #1615:

💥 maturin failed
  Caused by: pyproject.toml at /home/konsti/maturin/asdf/pyproject.toml is invalid
  Caused by: TOML parse error at line 7, column 17
  |
7 | license-files = [ "license.txt",]
  |                 ^^^^^^^^^^^^^^^^^
wanted string or table

Fixes #1615

Apparently toml (or serde) fails to generate spans when using `#[serde(flatten)]`.

New error message for #1615:

```
💥 maturin failed
  Caused by: pyproject.toml at /home/konsti/maturin/asdf/pyproject.toml is invalid
  Caused by: TOML parse error at line 7, column 17
  |
7 | license-files = [ "license.txt",]
  |                 ^^^^^^^^^^^^^^^^^
wanted string or table
```

Fixes #1615
@netlify
Copy link

netlify bot commented May 18, 2023

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 26606da
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/6465f895120cff0008d9b422
😎 Deploy Preview https://deploy-preview-1616--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@messense messense enabled auto-merge May 18, 2023 10:16
@messense messense added this pull request to the merge queue May 18, 2023
Merged via the queue into main with commit b1b2f15 May 18, 2023
@messense messense deleted the improve_toml_error_message branch May 18, 2023 11:09
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request May 21, 2023
https://build.opensuse.org/request/show/1088131
by user mia + dimstar_suse
- Update to v0.15.3:
  * Fix cross-compile to Apple universal2 in the other platform
    gh#PyO3/maturin#1613
  * Remove serde(flatten) to improve error messages
    gh#PyO3/maturin#1616
  * Allow syn 2.0
    gh#PyO3/maturin#1617
  * describe the need for module-name
    gh#PyO3/maturin#1604
  * Add PEP 517 config_settings support
    gh#PyO3/maturin#1619
  * Keep file mode on Unix
    gh#PyO3/maturin#1622
- Changes in v0.15.2:
  * Remove bors
    gh#PyO3/maturin#1602
  * When determining the python module name, use pyproject.toml
    project.name over Cargo.toml package.name.
    gh#PyO3/maturin#1608
  * Warn on missing python-source contents
    gh#PyO3/maturin#1607
  * Fix rewriting dev-dependencies in sdist
    gh#PyO3/maturin#1610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pyproject.toml is not PEP 517 compliant
2 participants