[Wasm] Use Node.js with canary v8 that supports recent Wasm GC changes
It's required to run wasm stdlib tests and compiler box tests with WASI. #KT-59720
This commit is contained in:
committed by
Space Team
parent
8a6fdf2493
commit
59a9855373
@@ -964,8 +964,15 @@ gradle.taskGraph.whenReady(checkYarnAndNPMSuppressed)
|
||||
|
||||
plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin::class) {
|
||||
extensions.configure(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension::class.java) {
|
||||
// Node.js with canary v8 that supports recent Wasm GC changes
|
||||
nodeVersion = "21.0.0-v8-canary202309167e82ab1fa2"
|
||||
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
|
||||
|
||||
npmInstallTaskProvider.configure {
|
||||
args += listOf("--network-concurrency", "1", "--mutex", "network")
|
||||
// It's required to pass compatibility checks in some NPM packages while using Node.js with Canary v8.
|
||||
// TODO remove as soon as we switch to release build of Node.js.
|
||||
args += listOf("--ignore-engines")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4535,6 +4535,24 @@
|
||||
<sha256 value="eda20d37da0c6629414121dc70c639944e0cfce37f0c5351a9c3141bdb80a4ff" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.nodejs" name="node" version="21.0.0-v8-canary202309167e82ab1fa2">
|
||||
<artifact name="node-21.0.0-v8-canary202309167e82ab1fa2-darwin-arm64.tar.gz">
|
||||
<md5 value="fc25379a3869be58e11a6e72b9235457" origin="Generated by Gradle"/>
|
||||
<sha256 value="2330f83d24a09b3d7d9a3084ba78a22012155bb915899c2f15143d26a5e9cd6c" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="node-21.0.0-v8-canary202309167e82ab1fa2-darwin-x64.tar.gz">
|
||||
<md5 value="6e1e5bb9f6cf84c9e2965e3dd833c42b" origin="Generated by Gradle"/>
|
||||
<sha256 value="a4b4377758631a6094ba8de746e59075ec8e822c99b2762f2beec2c8ef63084a" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="node-21.0.0-v8-canary202309167e82ab1fa2-linux-x64.tar.gz">
|
||||
<md5 value="bbb24603679dc3335e4fb913a4efaa16" origin="Generated by Gradle"/>
|
||||
<sha256 value="50780deafc38dba7596d66906ec458b7d3888e7f51522935b4de7299a9cacd7e" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
<artifact name="node-21.0.0-v8-canary202309167e82ab1fa2-win-x64.zip">
|
||||
<md5 value="68d526036bedd71229c52ae7c730bb86" origin="Generated by Gradle"/>
|
||||
<sha256 value="abb15cd73bad2a4e433da7ba40cba37da8a0fb4c45fb1f4547cb6bdcf8fa6b08" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.openjdk.jmh" name="jmh-core" version="1.21">
|
||||
<artifact name="jmh-core-1.21.jar">
|
||||
<md5 value="87fe00275cdaa76a31f73906fc8ee9d7" origin="Generated by Gradle"/>
|
||||
|
||||
+19
@@ -1,5 +1,6 @@
|
||||
import java.net.URI
|
||||
import org.jetbrains.kotlin.gradle.targets.js.d8.D8RootExtension
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
|
||||
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
|
||||
import org.spdx.sbom.gradle.SpdxSbomExtension
|
||||
|
||||
@@ -56,6 +57,24 @@ tasks.register("resolveDependencies") {
|
||||
)
|
||||
}
|
||||
|
||||
rootProject.extensions.findByType<NodeJsRootExtension>()?.run {
|
||||
project.resolveDependencies(
|
||||
"org.nodejs:node:$nodeVersion:linux-x64@tar.gz",
|
||||
"org.nodejs:node:$nodeVersion:win-x64@zip",
|
||||
"org.nodejs:node:$nodeVersion:darwin-x64@tar.gz",
|
||||
"org.nodejs:node:$nodeVersion:darwin-arm64@tar.gz"
|
||||
) {
|
||||
ivy {
|
||||
url = URI(nodeDownloadBaseUrl)
|
||||
patternLayout {
|
||||
artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]")
|
||||
}
|
||||
metadataSources { artifact() }
|
||||
content { includeModule("org.nodejs", "node") }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.extensions.findByType<YarnRootExtension>()?.run {
|
||||
project.resolveDependencies("com.yarnpkg:yarn:$version@tar.gz") {
|
||||
ivy {
|
||||
|
||||
@@ -38,7 +38,6 @@ private object NodeJsUtils {
|
||||
|
||||
fun useNodeJsPlugin(project: Project) {
|
||||
nodeJsPlugin = NodeJsRootPlugin.apply(project.rootProject)
|
||||
nodeJsPlugin.nodeVersion = project.nodejsVersion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user