Skip to content
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

Added WebAssembly features #452

Merged
merged 6 commits into from
Jun 9, 2023
Merged

Conversation

MendyBerger
Copy link
Contributor

Resolves mdn/browser-compat-data/issues/5796

Thanks @queengooborg for the new structure, it's a lot easier to make sense of the repo now.

Basic structure:
Added the wasm-feature-detect library, and testWasmFeature to the global bcd object.
testWasmFeature just calls wasm-feature-detect.
All the tests are in custom/wasm.json, where they have a readable name as the key, and the wasm-feature-detect name as the wfd-key value.

@queengooborg
Copy link
Member

queengooborg commented Jun 9, 2023

Thank you for working on this, @MendyBerger! This is looking quite wonderful so far!

There are a couple of things that we should do to ensure that the collector will still run in older browser versions:

  • First, async/await syntax cannot be used, especially in harness.js -- luckily, we can just remove those keywords, as the collector is designed to handle promises!
  • We should try to avoid adding the library's script directly to tests.ejs, and instead write a script to try and load the script, or set the wasmFeatureDetect variable to false if it couldn't be loaded.
    • On that note, in the testWasmFeature() function, there should be additional checks in place to make sure that wasmFeatureDetect is defined and is truthy, and that [feature] is defined in that variable
  • We should also put the testWasmFeature() function below testCSSProperty(), especially as right now, it's defined right below the JSDoc for testCSSProperty()

(If you'd like, I'd be more than happy to continue the development on this and get it ready to merge and deploy!)

@MendyBerger
Copy link
Contributor Author

If you could easily do those things, please do. Otherwise, I'll take another look when I have the time.
Either way, let me know.

Copy link
Member

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

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

I've just made some changes to get this all ready to deploy! I've just got one question for you in regards to formatting wasm.json, otherwise this looks great!

Comment on lines +3 to +5
"BigInt-to-i64-integration": {
"wfd-key": "bigInt"
},
Copy link
Member

Choose a reason for hiding this comment

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

Do you think that we should just simplify this to be "bcd-key": "wfd-key"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No strong preference. I did it this way so that in the future, we can add more configuration fields, but that might not be necessary.

Copy link
Member

Choose a reason for hiding this comment

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

I figured that was the case, but I wasn't sure if you had any configuration options in mind -- I'll leave the format as-is just in case!

@queengooborg queengooborg merged commit 437ba5b into openwebdocs:main Jun 9, 2023
2 checks passed
@MendyBerger
Copy link
Contributor Author

@queengooborg how long should it take until these results show up in caniuse.com?

@queengooborg
Copy link
Member

I can't say how long it would take for CanIUse to obtain them because it's a third party service, but for BCD, I'm hoping to get them added as soon as the new collector version is released. It may be a bit because I'm planning to increase category coverage and have a few other updates I wish to make, but once it's out I'll get a PR going to add this new category into BCD!

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.

Tracking WebAssembly features
2 participants