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
Add tests for invalid injection into tables after-the-fact via dotted keys #86
Add tests for invalid injection into tables after-the-fact via dotted keys #86
Conversation
👍 I'd suggest postponing the merge until toml-lang/toml#848 is merged, released, and toml-test updated to claim compatibilty with the new spec version. |
toml-lang/toml#848 isn't adding anything new/different to the language, though, so ideally it wouldn't depend on any release. The PR seems to be just a clarification of the way it has always been, so the language spec shouldn't need a version bump. |
This I disagree with. There is a difference between actual written out spec and author's intended spec. TOML v1.0.0 is and will forever be this even if intended otherwise. |
Eh. I disagree. |
Would you mind elaborating? IMO only things that are in the source tree under the release tag can be considered part of the spec. This excludes things like authors' issue comments, thoughts in their head, notes lying on their desk etc. 😄 This is how it works in software. If I release v2.0.0 of {my-application} and find out that there's a bug, I'll have to fix it and release v2.0.1. I can't just tell users that "yeah, stick to v2.0.0, the bug wasn't intended so it isn't there". |
I disagree on the basis that I don't think it is wrong to prohibit this behaviour in v1.0.0, but in fact it was always prohibited and you simply interpreted it incorrectly. That the language in the spec was not explicit enough to prevent this misinterpretation was unfortunate, but I believe the overall intention and direction of the spec has always been clear regarding the self-contained nature of So, if it were clarified as a retroactive wording defect, not a bug fix, then that makes sense to me, and thus wouldn't require a version bump because nothing about the language semantics had changed. |
Of course if others disagree with that point and insist on a version bump then so be it, but there's plenty of precedent for this logic in software versioning, despite "this is how it works in software". The ISO C++ comittee has a "Defect Report" system for applying clarifications and fixes retroactively without requiring a version bump, for example. |
Could you add a brief comment clarifying what exactly this tests and why it should be rejected? It's not immediately obvious from the test case itself, and will make things easier for implementers down the line who might be confused why this is invalid TOML. Or actually, maybe even better, encode it in the test itself:
Also, I think they can be stored as As for versioning: I thought about this before, and decided it wasn't really worth spending too much time on. The target audience of toml-test is very small with a very limited number of users (dozens, at the most). If your library doesn't implement a specific feature or some such then you can already skip these with the Could add |
Actually, make that |
Sure, done
Was that for me to do, or just thinking out loud? I'm happy to include it with this PR, though renaming it will break workflows for people explicitly skipping that particular test... |
see toml-lang/toml#846