Files
sdk/tools
Nate Biggs addbdcbd59 [dart2wasm] Add --dry-run flag to dart2wasm.
This new flag will run the CFE to create a kernel and then run a series of checks over the resulting kernel to look for errors that could block a wasm migration.

The compiler will then exit before actually starting the wasm compilation process. This means no output file will be emitted so callers must be aware of this.

This first CL is not meant to cover every check we could add here. It adds some initial checks and we can expand on this to include more in follow-up changes.

One of the checks implemented here is also provided by a lint. While ideally we would share code between lints and these checks, the delta in the CFE vs analyzer model makes that infeasible today.

Sample output:
```
Found incompatibilities with WebAssembly.

package:dryrun/test.dart 5:15 - Cannot test a JS value against String (3)
package:dryrun/test.dart 6:7 - JS interop class 'B' cannot extend Dart class 'A'. (2)
```

Bug: https://github.com/dart-lang/sdk/issues/60050
Change-Id: Ib2c8e3501cc42d57b86ebaa749359ce6c5dba974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437960
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-07-02 09:44:43 -07:00
..
2025-05-05 06:40:30 -07:00
2025-02-19 09:33:31 -08:00
2025-05-01 00:34:24 -07:00
2025-05-27 09:27:38 -07:00
2025-05-05 06:40:30 -07:00
2025-04-08 11:16:58 -07:00