Skip to content

fix: use iarna/toml instead of toml#118

Merged
pavelzw merged 10 commits into
prefix-dev:mainfrom
ruben-arts:fix/use_different_toml_parser
May 31, 2024
Merged

fix: use iarna/toml instead of toml#118
pavelzw merged 10 commits into
prefix-dev:mainfrom
ruben-arts:fix/use_different_toml_parser

Conversation

@ruben-arts

Copy link
Copy Markdown
Contributor

Using a better toml parser: https://shared.by.re-becca.org/misc/TOML-SPEC-SUPPORT.html

Fixes a known issue were the following table doesn't work but is valid toml:

[tool.pixi]
dependencies.boltons = "*"

@ruben-arts ruben-arts requested a review from pavelzw as a code owner May 31, 2024 05:49
@pavelzw

pavelzw commented May 31, 2024

Copy link
Copy Markdown
Collaborator

You need to add this library to the tsup config

@pavelzw

pavelzw commented May 31, 2024

Copy link
Copy Markdown
Collaborator

I think we should also wrap the readfile and parse toml in a try catch and do core.error if we catch something

const fileContent = readFileSync('pyproject.toml', 'utf-8')

The issue was a bit annoying to spot right now.

@pavelzw pavelzw added the bug Something isn't working label May 31, 2024
@ruben-arts

Copy link
Copy Markdown
Contributor Author

Is an core.error enough or should we add more info to it?

@pavelzw

pavelzw commented May 31, 2024

Copy link
Copy Markdown
Collaborator

I would add core.error("failed to parse pyproject.toml") and then throw the error again s.t. we see where this error was thrown. The previous error message (https://discord.com/channels/1082332781146800168/1082338253925003385/1245052133053829182) was not really helpful

All errors are catched and displayed in the outer most run action part

@ruben-arts

Copy link
Copy Markdown
Contributor Author

Yeah right! will do.

@ruben-arts

Copy link
Copy Markdown
Contributor Author

@ruben-arts

Copy link
Copy Markdown
Contributor Author

Or should we updated to pnpm 9?

And should I make a patch release?

@pavelzw

pavelzw commented May 31, 2024

Copy link
Copy Markdown
Collaborator

Let’s use pnpm 9 and a patch release 👍🏻

@pavelzw pavelzw merged commit ba3bb36 into prefix-dev:main May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants