Skip to content

provide a simple and uniform way to build projects #15859

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

Closed
sigmundch opened this issue Jan 2, 2014 · 19 comments
Closed

provide a simple and uniform way to build projects #15859

sigmundch opened this issue Jan 2, 2014 · 19 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Milestone

Comments

@sigmundch
Copy link
Member

[-- 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?

@sethladd
Copy link
Contributor

sethladd commented Jan 2, 2014

cc @kevmoo.

@keertip
Copy link
Contributor

keertip commented Jan 2, 2014

The editor would like to move to calling pub build for "Run as JavaScript", but is blocked on issue #14664.


Marked this as being blocked by #14664.

@DartBot
Copy link

DartBot commented Jan 2, 2014

This comment was originally written by @butlermatt


I think the build.dart also provides some great extra functionality, but as with Issue #15146 I think it's a bit of a misnomer. I've been thinking on ways I might be able to use build.dart to setup continuous testing from the editor. But as mentioned as an open issue it can still be used for linting and (for the time being) some building as well.

@clayberg
Copy link

clayberg commented Jan 3, 2014

Set owner to @keertip.
Added this to the 1.2 milestone.
Removed Type-Defect, Priority-Unassigned labels.
Added Type-Enhancement, Priority-Medium labels.

@DartBot
Copy link

DartBot commented Jan 3, 2014

This comment was originally written by @Emasoft


This issue is connected to another issue I opened some times ago:

https://code.google.com/p/dart/issues/detail?id=15561

We need to reduce complexity. Not only there are 4 ways to run an example, but the user must try a dozen html files before finding the right one to launch.

@nex3
Copy link
Member

nex3 commented Jan 6, 2014

Marked this as being blocked by #15829.

@munificent
Copy link
Member

Marked this as being blocked by #13848, #13935, #14815, #15020, #15924.

@munificent
Copy link
Member

Unmarked this as being blocked by #13848, #13935, #14815, #15020, #15924.

@sethladd
Copy link
Contributor

Bumping to high, should be done for the 1.2 release.


Removed Priority-Medium label.
Added Priority-High label.

@keertip
Copy link
Contributor

keertip commented Feb 7, 2014

An update on this issue

In the editor we now have

   (a) Run html directly in Dartium
   (b) Run html as Javascript by doing any necessary compilation via pub-build (compile with 'pub build'), and then launch the html from build directory.

We do not have
   
   (c) Run html compiled with pub-build in Dartium (compile with 'pub build --mode=debug')
  
Do we need to surface this option? Currently we show "Run in Dartium" and "Run as JavaScript" context menu options? Do we want to add a third one here? Seems like it would be one too many options for the user to choose from.


cc @sethladd.
cc @danrubel.
Unmarked this as being blocked by #14664, #14836.

@nex3
Copy link
Member

nex3 commented Feb 7, 2014

I don't think option (c) is necessary to expose through the editor.

@sigmundch
Copy link
Member Author

but my guess is that pub-serve should be (which would be equivalent to option (c)).

@nex3
Copy link
Member

nex3 commented Feb 7, 2014

Yes, probably both of these will go through "pub serve" once we have everything in place for editor integration there.

@sethladd
Copy link
Contributor

sethladd commented Feb 9, 2014

Agree with Nathan, (a) and (b) are P0. (c) can be solved by pub serve.

@keertip
Copy link
Contributor

keertip commented Feb 10, 2014

Yes, the plan is for (a) and (b) to go through pub serve once pub serve is ready.


Removed this from the 1.2 milestone.
Added this to the 1.3 milestone.

@DartBot
Copy link

DartBot commented Feb 25, 2014

This comment was originally written by [email protected]


pub build too slow. how to speed up?

@DartBot
Copy link

DartBot commented Feb 25, 2014

This comment was originally written by [email protected]


Please provide pub build option to compile only run on dartium, just like pub serve but not serve editor http server.

@sethladd
Copy link
Contributor

Joo, you might want to open a separate issue request for your comment 17. That way it won't get lost.

@keertip
Copy link
Contributor

keertip commented Mar 18, 2014

Run as Javascript now uses pub serve, and so speed (pub build) should no longer be an issue.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

8 participants