Don't use js.Map in ClassValue when targeting pure Wasm#1
Open
lostflydev wants to merge 37 commits intoscala-wasmfrom
Open
Don't use js.Map in ClassValue when targeting pure Wasm#1lostflydev wants to merge 37 commits intoscala-wasmfrom
lostflydev wants to merge 37 commits intoscala-wasmfrom
Conversation
We display a warning in two places: * when loading an sbt build with sbt-scalajs, and * when calling the `link` method of a `StandardLinkerImpl`.
This can be used for code that must adapt to the module kind in a way that would not link otherwise.
Removes [@tootallnate/once](https://github.com/TooTallNate/once). It's no longer used after updating ancestor dependency [jsdom](https://github.com/jsdom/jsdom). These dependencies need to be updated together. Removes `@tootallnate/once` Updates `jsdom` from 16.7.0 to 28.1.0 - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](jsdom/jsdom@16.7.0...28.1.0) --- updated-dependencies: - dependency-name: "@tootallnate/once" dependency-version: dependency-type: indirect - dependency-name: jsdom dependency-version: 28.1.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
…n/multi-dae47d5549 Bump @tootallnate/once and jsdom
…nsform Fix scala-js#5331: Transform the body of a void typed closure as a statement.
Tighten IR checking of NewLambda, and add checker tests.
Add LinkingInfo.moduleKind as a link-time property.
Close scala-js#5311: Deprecate support for JDK < 17.
3f9e613 to
d78dc6b
Compare
lostflydev
pushed a commit
that referenced
this pull request
Mar 10, 2026
- Remove top-level vals with JS types (RegExp, js.Function1) that caused linker errors in pure Wasm mode; inline them into linkTimeIf JS branches - Convert quoteStr from val to def so JS function is created lazily - Restore ClassValueTest exclusion (belongs to separate PR #1)
d78dc6b to
702d48e
Compare
Fix scala-js#5144: More direct hashing of method names for lambda class names.
Grow linear memory in malloc if required
The comparison was the wrong way around. On the first resize, we jumped straight to a buffer of size `min(Int.MaxValue, len)`. That was not too bad for `readNBytes` per se, but devastating for `readAllBytes`, which calls `readNBytes` with `len = Int.MaxValue`.
Sync upstream
Instead of boolean configs in `WasmFeatures`. It makes more sense to use a `ModuleKind`, because it affects how the produced artifacts look like to the external world, which is exactly what a `ModuleKind` specifies.
…nt-config Fix scala-js#5335: Throw a user-friendly exception on inconsistent config.
Bumps [undici](https://github.com/nodejs/undici) from 7.22.0 to 7.24.1. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.22.0...v7.24.1) --- updated-dependencies: - dependency-name: undici dependency-version: 7.24.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…n/undici-7.24.1 Bump undici from 7.22.0 to 7.24.1
[pull] scala-wasm from scala-js:main
…y-settings Use dedicated ModuleKind's for Wasm without a JS environment.
Previously, we were returning -1.
Strengthen the tests when in compliant mode.
Instead of a StringIOOBE, which is subject to UB.
It is specified as the more general exception, and in practice that is what the JVM throws. This was the only place where we explicitly threw an ArrayIOOBE not subject to UB.
This was the only place where we explicitly threw an `ArrayStoreException`, as opposed to a UBE.
The trick we use is to allocate an array of the requested length and discard it in statement position. We enhance the optimizer to recognize that pattern, so that we do not actually allocate an array. This is similar to what we do with `x.getClass()` to perform a null pointer check.
…-grow-buffer Fix the buffer growing logic in InputStream.readNBytes.
…xceptions In the javalib, always trigger UB for exceptions subject to UB.
a1fa424 to
8a7442e
Compare
[pull] scala-wasm from scala-js:main
8a7442e to
517fc5d
Compare
517fc5d to
cb6b295
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add LinkingInfo.targetPureWasm guards to ClassValue so the linker can dead-code-eliminate the js.Map branch for pure Wasm builds, always using HashMap instead.
Fixes scala-wasm#147