Open
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.
6f7a29d to
915b509
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.
…xceptions In the javalib, always trigger UB for exceptions subject to UB.
3ed6ea4 to
2cf48c9
Compare
[pull] scala-wasm from scala-js:main
Fix the remaining special-case handling needed for `Array[resource]` in the Wasm backend so the component-model example can allocate and use arrays of resource values. This is a kind of monkey patch. `WitResourceTypeRef` still does not behave enough like a normal class type, so we need a resource-specific branch in the array subtype / type-data path for now. The real fix is to make resource types behave more like regular classes. (make resourcs `final class` with some restrictions in class hierarchy, and make it `ClassType` and `ClassRef`). Once we do that, this special-case logic should become unnecessary and can be removed.
Fix array of resource
…linktime Don't use js.Map in ClassValue when targeting pure Wasm
They are backed by arrays, which is allowed by the spec. The motivation is not so much about ES 5.1 (which is deprecated anyway), but about future support of Wasm without a JS host. In Wasm without JS host, we should be able to allocate a direct `ByteBuffer` even if there are no JS typed arrays.
…ithout-typedarrays Allow to allocate direct byte buffers without typed arrays.
When the offset is out of bounds, it is unclear whether the method should throw or return false. The JVM is inconsistent. We choose to be maximally tolerant to delay UB until there is no other choice.
Unfortunately, it is unclear what to do about the two overloads of `ju.Objects.requireNonNull` with an explicit message. Either we keep the message and we have to throw an explicit NPE; or we trigger a UB NPE, but we ignore the message. We choose to trigger the UB, but then we catch a genuine NPE to rethrow it with the correct message. The message will still be lost when the NPEs are Fatal, but at least they are used when NPEs are Compliant. For the overload that takes a `messageSupplier`, additionally we choose to only call its `get()` method when we actually need the message, i.e., only in Compliant mode. These changes allow for good optimization opportunities. We intrinsify the 3 overloads so we can get the best possible code for every checked behavior. For Unchecked mode, the tests completely disappear. For Compliant and Fatal, we don't need to throw a fake NPE that we immediately try to catch and re-throw.
Run NPE tests for String{Builder,Buffer} when they are compliant,
instead of only when executing on the JVM.
Make ju.Objects.requireNonNull overloads follow Semantics for UB NPE.
b11cec8 to
4ef8731
Compare
…(typerPhase)` Remove `WitFunctionType` and `WitVariantValueTypes` maps from `JSGlobalAddons` that were stored during `PrepJSInterop`. Instead, query the compiler's symbol table directly using `exitingPhase(currentRun.typerPhase)` during JS code generation. This eliminates the store/retrieve pattern across compiler phases and simplifies WitExportInfo by removing its signature field.
Refactor: retrieve WIT type information from symbols in `exitingPhase(typerPhase)`
Sync upstream
Use RegExpImpl to abstract over js.RegExp / java.util.regex.Pattern: - URI parsing: restore _fld pattern using RegExpImpl.impl.exec/matches/ exists/getOrElse; remove parseURI helper - IPv6 detection: ipv6Re compiled via RegExpImpl.impl.compile; inline the test into uriStr - uriRe: single val with RegExpImpl.impl.compile at end of block - Quoting (5 patterns): use RegExpImpl.impl.replaceAll with java.util.function.Function; QuoteStrMapper object in object URI - Path normalization: String#split + ju.Arrays.asList/subList/ scalaOps.mkString RegExpImpl additions: - Flags object (Global/CaseInsensitive as Int) replaces String flags - compile(patternStr, flags: Int) overload - replaceAll(pattern, string, Function[String,String]) with jsReplace in JSRegExpImpl and Matcher.replaceAll in JavaRegExpImpl Unblock URITest in pure Wasm test suite. Add tests for previously untested code paths: multi-component constructors, IPv6 host, quoteIllegal, normalize edge cases
c71aa5b to
2f58550
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.
Summary
Make java.net.URI fully compatible with the pure Wasm backend by providing linkTimeIf branches for all JS-dependent operations.
Closes scala-wasm#153
Changes