addbdcbd59
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>