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

Fix build web compilers wasm issue #3748

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Sep 10, 2024

This fixes three issues from the dart2js+dart2wasm PR:

  1. Since YamlMap is not a Map<String, dynamic>, .cast() doesn't work. Tests didn't catch this because we weren't reading from yaml.
  2. The loader script had multiple issues - it referenced an undefined function and assumes that WebAssembly is defined. Tests didn't catch this because this was only exercised in the fallback path, and we were only testing on Chrome. I've fixed the loader script and added a custom browser platform that disables WebAssembly in Chrome to make sure the fallback path is working.
  3. We've stopped emitting dart2js archives because we expected them to look like main.dart.js*. When using a custom build extension for dart2js, they are actually named main.dart2js.js* - I've fixed that, this is tested by the deferred imports hello world test in _test.

Sorry for the mess!

Closes #3746.
Closes #3747.

@simolus3 simolus3 marked this pull request as ready for review September 10, 2024 23:05
Copy link

github-actions bot commented Sep 10, 2024

PR Health

Package publish validation ✔️
Package Version Status
package:build 2.4.2-wip WIP (no publish necessary)
package:build_config 1.1.2-wip WIP (no publish necessary)
package:build_daemon 4.0.3-wip WIP (no publish necessary)
package:build_modules 5.0.10-wip WIP (no publish necessary)
package:build_resolvers 2.4.3-wip WIP (no publish necessary)
package:build_runner 2.4.13-wip WIP (no publish necessary)
package:build_runner_core 7.3.3-wip WIP (no publish necessary)
package:build_test 2.2.3-wip WIP (no publish necessary)
package:build_web_compilers 4.1.0-wip WIP (no publish necessary)
package:scratch_space 1.0.3-wip WIP (no publish necessary)

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@kevmoo kevmoo requested a review from jakemac53 September 10, 2024 23:35
@kevmoo
Copy link
Member

kevmoo commented Sep 10, 2024

This seems to work everywhere: https://j832-com--wasm-check-wzo4ep4u.web.app/

@kevmoo kevmoo merged commit 1b95352 into dart-lang:master Sep 11, 2024
76 checks passed
@simolus3 simolus3 deleted the bwc-fixes branch September 11, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New wasm compile fails with JS fallback Wasm compile crashes as build time
3 participants