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

Check NodeJs and D8 versions before adding --experimental-wasm-gc #213

Merged

Conversation

fzhinkin
Copy link
Contributor

Closes #212

@fzhinkin
Copy link
Contributor Author

As of testing, recent d8/nodeJs versions are only supported starting from 1.9.24, so we need to either pass Kotlin version to ProjectBuilder, or update Kotlin version for the whole project.

@qurbonzoda, please let me know which version you would prefer, and I'll push tests.

@fzhinkin fzhinkin marked this pull request as ready for review May 13, 2024 09:51
addWasmArguments()
val addGcArgs = project.extensions.findByType(NodeJsRootExtension::class.java)?.let {
val nodeVersion = VersionNumber.parse(it.nodeVersion)
// Starting from version 22, NodeJS is shipped with V8 versions
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really want to support nodejs version <22? Maybe better just to drop this code as deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me. Those who really need an older version can always supply the experimental-gc flag manually (but we should document that workaround, though).

@qurbonzoda WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

I do not really think that we have so many users which run benchmarks with old node/d8. So maybe we could just drop it without any workarounds and etc?

Copy link

Choose a reason for hiding this comment

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

I'll use an older version of Node for example. I develop VS Code extensions and my Node version is always synced with the Electron one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lppedd, I'm curious: does the Kotlin/Wasm work with it?

Copy link

@lppedd lppedd May 13, 2024

Choose a reason for hiding this comment

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

Yes, I can execute K/WASM tests, and I can load WASM binaries inside of my extensions (e.g., inside of a webview).
See also https://code.visualstudio.com/blogs/2024/05/08/wasm for what VS Code will support going forward.

Hopefully we'll have a VS Code version based on Electron with Node 22+ by the end of the year, but who knows.
I think letting the consumer choose the version is a better path anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Given there are use cases, I would prefer to keep the --experimental-wasm-gc argument for users on older Kotlin and/or Node.js versions.

@qurbonzoda
Copy link
Collaborator

As of testing, recent d8/nodeJs versions are only supported starting from 1.9.24, so we need to either pass Kotlin version to ProjectBuilder, or update Kotlin version for the whole project.

I prefer passing the Kotlin version to ProjectBuilder.

@fzhinkin fzhinkin merged commit aff0cac into Kotlin:master May 27, 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.

WasmJs: don't add experimental-wasm-gc flag for NodeJs >= 22
4 participants