-
Notifications
You must be signed in to change notification settings - Fork 471
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 metadata about the ECMAScript edition that each feature was introduced in #4161
Comments
I think a unified file would be nicer, but that might interfere with how existing runners interface with the existing one. (also, we should be using years, post-ES6, not edition numbers) |
This is possible to do using comments. The file already has some comments, so we could probably leverage that to add metadata in a backwards-compatible way. |
That's fair. I'm just using the edition identifier used by the two example runners, but it would also be understandable to use the more "official" identifier instead. (runners could always subtract 2009 if they need the "semver" identifier) |
Added concept of |
I'm not sure toml is a good choice solely because it's not natively parseable in node and other platforms (altho i love toml!) |
That's a valid concern. Considering wider support, using a
|
I think using YAML would be the most consistent in this case. Every test needs YAML in order to be interpreted correctly, so I think we should avoid introducing another metadata format. |
Given you quoted test262.fyi as a use case I would strongly advise against YAML, browsers can't parse that :) There are also languages that still don't have a decent YAML parser (for instance Zig), because YAML is an awfully complex format. I consider test262 using YAML metadata a mistake that's hard to rectify at this point, but please don't use that as an argument to add more YAML. |
@linusg JSON is also fine by me. The one thing I would advocate for is to keep everything on the |
It's pretty common for test runners such as test262.fyi to have a way to filter tests per ECMAScript edition, and some people like to analyze the conformance of engines per ES version.
Currently some runners have opted for using "features.txt" to extract this information, since features have a clear edition where they were introduced, and this could be used to know which minimum edition a test supports. However, there's some duplicate effort around this, since all runners have to maintain a separate mapping from the feature to the corresponding edition that introduced it:
Seeing this, it would be nice to remove this duplicate effort by moving this metadata here.
Possible points of discussion
The text was updated successfully, but these errors were encountered: