-
Notifications
You must be signed in to change notification settings - Fork 71
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
Contradicting tests invalid/no-seconds.toml
and valid/no-seconds.toml
#134
Comments
Times without seconds were invalid in TOML v1.0.0. But they are now valid, as of PR 894 of toml-lang/toml, so they will be valid when the first RC of TOML v1.1.0 is released. I don't know what the plans will be for the invalid tests in the future, but one way or another, they'll be gone. |
Yeah, what @eksortso said. Some tests only apply to specific versions; there's a list in https://github.com/BurntSushi/toml-test/blob/master/version.go By default only the 1.0 tests are run with Maybe the filenames should be updated to make this more obvious as this confusion has come up before and it will only become more confusing as TOML 1.1, 1.2, etc. get released in the future.
The general idea is to remain compatible with all TOML versions whenever possible, since many libraries tend to be fairly slow in updating. In hindsight I should have done this when I updated this from 0.4 to 1.0 since it caused me some pain. Live and learn. |
Adding the version in the filenames would be great. I am integrating the test files directly into the unit test for the parser (will be published soon), as I try to have as little dependencies possible. |
The issue is that I would prefer the filenames to remain stable, so people can skip them and safely update toml-test without worrying about which tests moved around. In the own TOML parser I maintain I skip some minor things because they're fairly hard to fix and, IMHO, not worth the bother. On the other hand, by adding new TOML 1.1 tests also means people can't safely update, since TOML 1.0 parsers will break. I'm not 100% sure yet how to best handle this; I will reopen this issue as a reminder that something needs to be done. |
What about adding a |
Yeah, that's probably the best solution. I added a new To make things easier for other people I also added a pre-generated |
In the HEAD version from the repository (commit 01cfece), There are tests in the invalid and valid directory, both testing for date/time values without seconds.
invalid/no-seconds.toml
valid/no-seconds.toml
The text was updated successfully, but these errors were encountered: