Fix error parsing TOML files that use dotted keys#438
Open
mitchellhenke wants to merge 4 commits intoerlef:mainfrom
Open
Fix error parsing TOML files that use dotted keys#438mitchellhenke wants to merge 4 commits intoerlef:mainfrom
mitchellhenke wants to merge 4 commits intoerlef:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I have a relatively small mise.toml file, but
erlef/setup-beamfails to parse it due to the use of dotted keys. The current version of toml lists support for TOML v0.4.0, and dotted key support was added in v0.5.0 (in 2018).An example file that will fail:
The logs for the above result in:
Given that, it may make sense to consider switching parsers. The smol-toml package is already in package-lock.json as a transitive dependency of another one, and so I chose that since it seemed more straightforward. Mise itself uses js-toml as another potential alternative. I've also updated a test and confirmed the test fails on main and passes with the later changes.
If there's anything I can do to help get something merged to solve this issue, just let me know!