Closed simolus3 closed 2 months ago
There is also the option of a dart2wasm+dart2js
named compiler or something. I think I like that more than an array of compilers where we have to check the valid combinations.
Is there anything left I can help with to get this released?
I think we're done, modulo bugs. The question: do we release before Dart 3.6 stable is out.
We could do a beta release, if that's useful for you.
Well I'd definitely prefer a beta release over having to add git dependency overrides everywhere :) I've opened a PR for that, but if it's too much work to get this released it's not critical either.
In https://github.com/dart-lang/build/pull/3727, there was a discussion on how to best support scenarios where we'd compile Dart apps with dart2js and dart2wasm, using a browser compatibility check at runtime to select the right application. I wanted to extract this into a separate issue so that it doesn't get lost.
For the feature detection in an entrypoint script, we probably want to clone what Flutter is doing. A question is how this would be enabled (or if it should be the default), possible options are:
compiler
builder option and adding a new boolean flag controlling whetherdart2wasm
should be running too. A downside is that users then won't be able to use dart2wasm exclusively (if that's what they want).compiler
option into an array (which would be a singleton if a string is given). The compiler could then default to[dart2js, dart2wasm]
and the entrypoint builder would take care of emitting an entrypoint script if multiple compilers are enabled. A question is what we'd do if bothdartdevc
anddart2js
are listed - we could simply reject those configurations, or only considerdart2js
in the entrypoint script while still emittingdartdevc
modules (can be useful for tests where one wants to test compatibility with all three compilers).A couple of follow-up issues before we call this closed.