Skip to content

Fix error parsing TOML files that use dotted keys#438

Open
mitchellhenke wants to merge 4 commits intoerlef:mainfrom
mitchellhenke:main
Open

Fix error parsing TOML files that use dotted keys#438
mitchellhenke wants to merge 4 commits intoerlef:mainfrom
mitchellhenke:main

Conversation

@mitchellhenke
Copy link

@mitchellhenke mitchellhenke commented Mar 19, 2026

Description

I have a relatively small mise.toml file, but erlef/setup-beam fails 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:

# mise.toml
[tools]
elixir = "1.19.5"
erlang = "28.3"

[env]
_.file = ".env"

The logs for the above result in:

Run erlef/setup-beam@v1
  with:
    version-file: mise.toml
    version-type: strict
    github-token: ***
    otp-architecture: 64
    install-hex: true
    install-rebar: true
    disable_problem_matchers: false
    hexpm-mirrors: https://builds.hex.pm
  
  env:
    MIX_ENV: test
Parsing mise.toml file at mise.toml
  Error: Expected "=", [ \t] or [A-Za-z0-9_\-] but "." found.

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!

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.

1 participant