-
Notifications
You must be signed in to change notification settings - Fork 1
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
Invalid TOML #2
Comments
For you own reference, here's a stand-alone script to verify TOML in Python: import sys, toml
filename = 'fpm.toml'
with open(filename, 'r') as myfile:
data=myfile.read()
p = toml.loads(data)
print(p)
|
Thanks. Problem is I wrote about ten of them the same way, so I need to re-apply your changes. fpm(1) appeared to work fine with them the way they wer with the fpm(1) version I currently have so I would not have noticed till fpm(1) refused to read them, I suspect. |
Thanks. I pulled the changes. I need to track down the python::toml package or some other toml tools to valid others; which I suspect also have issues. First use of toml, I'm afraid. I was trusting fpm(1) to validate it.
… On 08/03/2020 4:09 AM Laurence Kedward ***@***.***> wrote:
Hi @urbanjost https://github.com/urbanjost ,
I'm doing some work (fortran-lang/fpm-registry#11 fortran-lang/fpm-registry#11 ) on the fpm-registry https://github.com/fortran-lang/fpm-registry/ in order to get fpm packages listed on the website.
As part of this I've been parsing fpm.toml files from each package in the registry and I've noticed that M_CLI uses an invalid TOML syntax. Though Haskell fpm doesn't complain about this, it is causing some issues when parsing the TOML in Python.
According to the spec https://toml.io/en/v1.0.0-rc.1#keyvalue-pair , there must be a newline after each key/value pair.
I believe the minimal syntax you are looking for can be achieved with inline tables, see here https://toml.io/en/v1.0.0-rc.1#filename-extension (scroll up slightly).
If I get time later, I can put together a pull request.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #2 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDWN3IIOTQNGDCW3G375ZDR6ZWDNANCNFSM4PTCSKPQ .
|
Sounds good. Sorry, for some reason I'd thought Also any |
Hi @urbanjost,
I'm doing some work (fortran-lang/fpm-registry#11) on the fpm-registry in order to get fpm packages listed on the website.
As part of this I've been parsing
fpm.toml
files from each package in the registry and I've noticed that M_CLI uses an invalid TOML syntax. Though Haskell fpm doesn't complain about this, it is causing some issues when parsing the TOML in Python.According to the spec, there must be a newline after each key/value pair.
I believe the minimal syntax you are looking for can be achieved with inline tables, see here (scroll up slightly).
If I get time later, I can put together a pull request.
The text was updated successfully, but these errors were encountered: