Skip to content

Track and update all the implemented features - #390

Merged
dschuff merged 9 commits into
WebAssembly:mainfrom
CryZe:all-the-implemented-features
Aug 12, 2024
Merged

dschuff merged 9 commits into
WebAssembly:mainfrom
CryZe:all-the-implemented-features

Conversation

@CryZe

@CryZe CryZe commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

After seeing https://labs.leaningtech.com/blog/branch-hinting yesterday, I was quite surprised to read that not only is this proposal done, but it's also implemented in all the browsers, and yet it's not even tracked in the features.json file.

So I took it upon myself to make sure that all features that are in at least phase 3 (implementation phase) are tracked and up to date. While doing this I however noticed that with the recent addition of "Custom Page Sizes", at least one phase 1 feature is also tracked now. So I exhaustively updated the features.json file to include all features that are implemented in at least one engine as well.

With there being a lot more proposals that are being tracked now, I thought it would also make sense to properly reflect the phases on the website, instead of splitting them into just two sections.

Comment thread features.json Outdated
Comment thread features.json
Comment on lines +29 to +33
"customAnnotationSyntaxInTheTextFormat": {
"description": "Custom Annotation Syntax in the Text Format",
"url": "https://github.com/WebAssembly/annotations/blob/main/proposals/annotations/Overview.md",
"phase": 5
},

@CryZe CryZe Jul 18, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is weird, because almost all engines don't support the text format. I added it because it's a phase 5 proposal, so it's there for exhaustiveness reasons, but it's N/A in all but wasmtime, which seems to just ignore it (so I wasn't able to add a version number there either).

Comment thread features.json
Comment on lines +39 to +43
"esmIntegration": {
"description": "ESM integration",
"url": "https://github.com/WebAssembly/esm-integration",
"phase": 3
},

@CryZe CryZe Jul 18, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only one that's not implemented by any, but is in phase 3, which falls into my "everything phase 3 and up having to be listed" rule, which is of course arbitrary, so we can remove it again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm, turns out it's implemented by Webkit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I wasn't aware of this. Do you know if it's up-to-date? There have been quite a few changes in the long time since the proposal started. Maybe @guybedford knows.
If it's the original version of the proposal and not the current one, we probably shouldn't include it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd guess it's not up to date, but I don't actually know.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... obviously proposals can change before standardization and browsers won't always be up-to-date, so any inclusion of flagged is sort of a judgement call. But in this case I think I would not mark ESM integration as implemented in this case, because I suspect it's a very old version of the proposal, and also because there is an up-to-date polyfill that it would make more sense for users to try.

Comment thread features.json Outdated
@CryZe
CryZe force-pushed the all-the-implemented-features branch from 0762225 to 1880a70 Compare July 18, 2024 17:10
Comment thread features.js Outdated
@CryZe
CryZe force-pushed the all-the-implemented-features branch 2 times, most recently from 6d4a37b to 9b59634 Compare July 19, 2024 17:36
@CryZe

CryZe commented Jul 19, 2024

Copy link
Copy Markdown
Contributor Author

Here is what the new table looks like:
localhost_8000_features_ (2)

After seeing https://labs.leaningtech.com/blog/branch-hinting yesterday,
I was quite surprised to read that not only is this proposal done, but
it's also implemented in all the browsers, and yet it's not even tracked
in the `features.json` file.

So I took it upon myself to make sure that all features that are in at
least phase 3 (implementation phase) are tracked and up to date. While
doing this I however noticed that with the recent addition of "Custom
Page Sizes", at least one phase 1 feature is also tracked now. So I
exhaustively updated the `features.json` file to include all features
that are implemented in at least one engine as well.

With there being a lot more proposals that are being tracked now, I
thought it would also make sense to properly reflect the phases on the
website, instead of splitting them into just two sections.
@CryZe
CryZe force-pushed the all-the-implemented-features branch from 9b59634 to 38ec321 Compare July 19, 2024 17:58

@dschuff dschuff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is impressive!
One concern I have is that this table is meant to help developers who might not be following super-closely along with the progress of specs, and might want to know whether they should try out a feature (or target it with a compiler). For very early-stage proposals, the answer is usually "maybe; it's complicated". I'm not sure it's helpful to just declare that a feature is supported, even with a flag. I don't know if that means we should just make a judgement call about whether to include a feature, or have some other caveats, or treat stage 1 proposals differently, or what.

Comment thread features.json
Comment on lines +39 to +43
"esmIntegration": {
"description": "ESM integration",
"url": "https://github.com/WebAssembly/esm-integration",
"phase": 3
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I wasn't aware of this. Do you know if it's up-to-date? There have been quite a few changes in the long time since the proposal started. Maybe @guybedford knows.
If it's the original version of the proposal and not the current one, we probably shouldn't include it.

Comment thread features.json Outdated
Comment thread features.json Outdated
@rossberg

Copy link
Copy Markdown
Member

This is very nice. But I have to agree with @dschuff about early phases: there is basically no entry requirement to phase 1, and proposals at this stage generally are "just an idea", often with no worked out design that could even be implemented and no agreement yet that they should ever be included. Implementations at this stage are mostly experiments. So it may be misleading to show phase 1 in this table, and may set wrong expectations. In contrast, phase 2 at least requires a "complete overview document" and "reasonably high level of consensus".

@CryZe

CryZe commented Jul 26, 2024

Copy link
Copy Markdown
Contributor Author

I can remove the phase 1 proposals then, but what about the component model and custom page sizes (the latter already having been there from a recent PR)?

Comment thread features.js Outdated
Comment thread features.json
@rossberg

Copy link
Copy Markdown
Member

Custom page sizes is scheduled for a phase 2 vote next Tuesday, so we could just wait that out. The component model is rather special, since it is it's own separate layer and will not necessarily be implemented in engines.

@dschuff

dschuff commented Jul 29, 2024

Copy link
Copy Markdown
Member

That's a good point about the phase 2 requirements being a good proxy for the usefulness of trying out a feature. I think that makes sense as a "default" criterion for inclusion here.
I'm fine leaving custom page sizes in for now though, even if we don't wait; if it doesn't make it to phase 2, we can figure out what to do.
CM is more interesting. My intuition is that it's well-specified enough that it might be useful for users or tool-builders to try to use, but as @rossberg mentioned, the layering is complicated and the relevant implementations are mostly not in this table. I'd say it probably makes sense to leave it out of this table for this PR, but if there's interest in coming up with an analogous convenience for developers, we can certainly discuss that.
/cc @lukewagner

@CryZe

CryZe commented Jul 29, 2024

Copy link
Copy Markdown
Contributor Author

I removed all the phase 1 proposals and preemptively moved Custom Page Sizes to phase 2.

Groups the features via `Object.groupBy`, which is supported by all
modern browsers.
@CryZe

CryZe commented Jul 30, 2024

Copy link
Copy Markdown
Contributor Author

Here is the latest table, with most concerns addressed:
localhost_8000_features_ (3)

@dschuff dschuff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for more comments! Now you're discovering why some of these were "conveniently" left out :D
thanks for perservering!

Comment thread features.json
"logo": "/images/safari.svg",
"features": {
"bigInt": ["15", "wasm-bigint is supported in desktop Safari since 14.1 and iOS Safari since 14.5; however BigInt64Array, which is needed by Emscripten, was released in 15"],
"branchHinting": "16",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is correct? I don't see any mention in https://developer.apple.com/documentation/safari-release-notes/safari-16-release-notes and that would have been released before the feature went to phase 4, which browsers usually don't do.

@CryZe CryZe Jul 30, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been enabled by default ever since Safari 16. In the latest Webkit there is no longer any feature to toggle it. I'll recheck to see if they "removed the feature" or if that's just because they don't need a toggle anymore.

https://github.com/WebKit/WebKit/blob/releases/Apple/Safari-16-iOS-16.0/Source/JavaScriptCore/runtime/OptionsList.h#L557

@CryZe CryZe Jul 30, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, they removed the toggle because it's "already shipped" here: WebKit/WebKit@ca9f4e6

So yeah, it's been shipped since Safari 16, despite it not having been in phase 4.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha, and it was enabled in WebKit/WebKit@e1f19d7
I'll bet this was an accident, actually. TC39 has a similar stage process for JS features, and IIRC browsers typically ship at stage 3. Anyway, this is fine for the website, I'll follow up and make sure there's nothing that they need to fix or update with the proposal :)

Comment thread features.json
Comment thread features.json
Comment thread features.json
Comment on lines +39 to +43
"esmIntegration": {
"description": "ESM integration",
"url": "https://github.com/WebAssembly/esm-integration",
"phase": 3
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... obviously proposals can change before standardization and browsers won't always be up-to-date, so any inclusion of flagged is sort of a judgement call. But in this case I think I would not mark ESM integration as implemented in this case, because I suspect it's a very old version of the proposal, and also because there is an up-to-date polyfill that it would make more sense for users to try.

Comment thread features.json Outdated
},
"exceptions": {
"description": "Exception handling",
"description": "Exception Handling",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in #389, I don't think we want to just move this to phase 4 as-is. Take a look at the discussion there, and feel free to incorporate that into your PR, or I'm also OK with just leaving EH as phase 3 for this PR and dealing with EH separately.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, i just noticed that you describe that in the notes in this PR. My concern with this approach is that developers might think there is no supported EH option across the web, while in fact there is (i.e. until exnref is supported on all browsers, I expect that at least developers of C++ and any other toolchain that supports the existing EH will continue to use that).
Maybe we should figure out what flag options we want to use in emscripten and revisit this...
But anyway.... to avoid letting the perfect being the enemy of the good and stalling this too long, maybe let's just land this PR and then split it out in a separate PR.
So maybe my question for you here is, how easy would it be with this code architecture to add another category to the table for deprecated features?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split it into a deprecated section now.

CryZe added 3 commits July 31, 2024 00:50
This introduces a new deprecated section where the old exception
handling proposal is showcased.
The proposal is still shown, but there is no browser implementing it.
They are not web browsers, so they don't need it.

@dschuff dschuff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this change the PR LGTM

Comment thread features.json Outdated
},
"exceptions": {
"description": "Exception handling",
"description": "Exception Handling",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we call this "Legacy Exception Handling" to match the spec, and for now how about calling exceptionsFinal "Exception Handling with exnref` to disambiguate and for consistency with Emscripten. Once some time has passed and the emscripten/LLVM implementation is mature we can start changing the language in the documentation to make exnref more like the "default".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I renamed them.

@CryZe

CryZe commented Aug 11, 2024

Copy link
Copy Markdown
Contributor Author

I pushed one additional change marking GC as being enabled in Safari 18. While it is indeed now enabled by default in Webkit, I don't actually know whether that also means it will be in the final Safari 18 or they ship an earlier version of Webkit. We could wait for the next iOS 18 Beta and check, or I can just revert it.

@CryZe
CryZe force-pushed the all-the-implemented-features branch from a9bac93 to 51f3aa3 Compare August 11, 2024 15:46
@CryZe

CryZe commented Aug 11, 2024

Copy link
Copy Markdown
Contributor Author

I undid that change. It seems like they mostly just cherry pick changes during the beta period, so it might not make it until 18.1. I'll just do a follow up PR then.

@dschuff

dschuff commented Aug 12, 2024

Copy link
Copy Markdown
Member

I undid that change. It seems like they mostly just cherry pick changes during the beta period, so it might not make it until 18.1. I'll just do a follow up PR then.

I think this is the right thing to do. When a feature turns on by default in WebKit it usually means it will ship in Safari, but not always. And Apple is very opaque about their release process and will never say anything about what will release in the future. So in my experience it's just best to wait until the official beta releases come out.

@dschuff

dschuff commented Aug 12, 2024

Copy link
Copy Markdown
Member

This is great, thanks for all your work on this!

@dschuff
dschuff merged commit a729442 into WebAssembly:main Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants