-
Notifications
You must be signed in to change notification settings - Fork 38
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
async/await is not part of ES6 #420
Comments
iiuc, "es6" there actually doesn't mean ES6, but ES6+. |
The toolchain should mostly support several IDLs already. Before we use it, we'll need to solve a few issues, though:
Does anyone wish to work on this? Otherwise, I can take a look once we're more advanced with our current context-0.1 sprint. |
talked with Yoric, and here's summary. regarding IDL versions (and format versions), there are several things to consider. here's the example based on async function' case: How to extend AST (IDL)1. just add field to existing interfacedefine an extension in IDL that adds field to existing interface. es6.webidl
es7.webidl
Pros
Cons
2. add yet another interface for new typeadd interfaces that corresponds to the language extension. es7.webidl
the result of
Pros
Cons
3. add yet another interface with flagadd interfaces that has flag, that corresponds to the language extension. es7.webidl
the result of
Pros
Cons
How to extend formatin any case above, "context" format's model table becomes incompatible with older versions.
so, things to consider:
What implementations should support
|
My take on this is that 3. add yet another interface with flag is the closest to the current behavior of JS, so we should strive for this. This assumes that the codec has a way to encode this without size/performance loss. I feel it's feasible to evolve context-0.1 in this direction. Note that we can actually have es7.webidl [ExtendsTypeSum=FunctionExpression]
interface EagerFunctionExpressionES7 : EagerFunctionExpression {
attribute boolean isAsync = false;
};
[ExtendsTypeSum=FunctionExpression]
interface LazyFunctionExpressionES7 : LazyFunctionExpression {
attribute boolean isAsync = false;
}; The As a compression side-note, this looks very much like a simple case of TreeRePair. Maybe looking at TreeRePair will give us another way to look at the problem. Now, on your detailed questions, here's my take.
Definitely. Firefox 124 cannot afford to reject files designed for Firefox 123 :)
We need to find a way to make it read the older version without over-complicating the implementation.
As this is not what happens with JS nowadays, I would like to avoid this.
I'm not sure what you mean by "newer format". For newer IDL, I'd like to support it whenever possible. Just because the IDL and the encoder have changed, we do not want to stop supporting older browsers if we're only using older features.
I'd like to.
Good point. I think it should try. |
The format prototype in fbssdc punted on grammar versioning/evolution, but that should be fixed. I think we should wait until we have data from serving this format. Specifically, if file sizes are still a problem, I think it's likely the next iteration of the file format will want to have multiple models per field, and start to exploit some of the regularities between different kinds of fields which are barely exploited today. A lot of nice solutions for evolution available with tweaks to the simple format we have today would be invalidated by these constraints. It's still worth thinking about the shape of the problem now though. We need to think specifically about the kinds of changes we might encounter. I think those are:
We should also think about goals. For example:
Achieving all of these will be hard but we can at least understand the trade-offs we are making. |
@dominiccooney I'll answer your message more completely when I have more time, just a few quick points.
As far as I understand, Cloudflare and Facebook have different priorities here. Cloudflare prioritizes grammar compatibility.
We still need to run tests, but I don't think that file sizes are a problem at the moment, as long as we have proper support for codec dispatch. In particular, as soon as we actively work on streaming, we'll be faster pretty much regardless of the size of the file. |
I've noticed that there is
isAsync
andAwaitExpression
ines6.webidl
, but they weren't actually part of ES6 and, correspondingly, also not supported by currently included version of the Shift parser.They should be moved out to a separate IDL file or the file should be renamed not to include a version.
The text was updated successfully, but these errors were encountered: