Description
[-- I'm creating this as an umbrella issue, to collect all of our ideas in this area. Not everything here is an editor issue, some things might have to be fixed in pub or in packages. I couldn't find if there was a bug for this already, if so, sorry for the duplicate --]
Now that we have pub-build, some of the processes for building from the editor are no longer necessary, and are starting to become confusing to our users. It would be great to get to a point where there is just one way to build, one way to lint, and one way to debug.
Take a look at this discussion for some background
https://groups.google.com/a/dartlang.org/d/msg/web/f-D1xdeK_Wk/5I0g85VhiFEJ
Some highlights: A user understands that there are at least 4 ways to run an example:
(1) Select the html file directly and "Run in Dartium"
(2) Select the html file directly and "Run as Javascript"
(3) Build and then select the corresponding file under build and "Run in Dartium"
(4) Build and then select the corresponding file under build and "Run as Javascript"
Turns out that the way things work (2) is broken (it doesn't run pub-build), and (3) doesn't work because by default pub-build doesn't output the dart implementation.
I proposed in that thread that we might want something closer to 3 ways to run an example:
(a) Run html directly in Dartium (no compilation, in the future maybe use 'pub serve'?)
(b) Run html as Javascript by doing any necessary compilation via pub-build (compile with 'pub build --mode=release')
(c) Run html compiled with pub-build in Dartium (compile with 'pub build --mode=debug')
where: (a) is like (1) and works today. (b) is like (2) and (4) and could be done today if we fix issue #14836, (c) would be a working version of (3).
There are many open questions still. Here are some I can think of:
- Run-as-Javascript was nice because you could run it on demand on a single file. Can we get to the point where pub-build supports that?
- build.dart is still in use for linting - can we do something with pub-build (maybe pub-lint?) to get that information in a uniform way?