Skip to content
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

Can not deploy a polymer.dart application #12732

Closed
DartBot opened this issue Aug 25, 2013 · 19 comments
Closed

Can not deploy a polymer.dart application #12732

DartBot opened this issue Aug 25, 2013 · 19 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@DartBot
Copy link

DartBot commented Aug 25, 2013

This issue was originally filed by david.elba...@gmail.com


What steps will reproduce the problem?

  1. Create a polymer.dart application ( You can use : "https://github.com/sethladd/dart-polymer-dart-examples/tree/master/web/deploy_to_javascript" for example)
  2. Build it via build.dart and --deploy parameter
  3. Deploy it
  4. Launch it in dartium

Error :
"Breaking on exception: Bad state: No elements"

Not working on Dartium nor Chrome

What version of the product are you using? On what operating system?

Mac, r26297

Please provide any additional information below.

@DartBot
Copy link
Author

DartBot commented Aug 25, 2013

This comment was originally written by david.elba...@gmail.com


It doesn't work better with r26618.

@sigmundch
Copy link
Member

Added Area-Polymer, Triaged labels.

@sethladd
Copy link
Contributor

I tried loading this built and 'pub deploy'ed' version with Chrome, and it worked. Not sure you can access the deployed app with Dartium.

@sethladd
Copy link
Contributor

Regardless, we can make deploying a polymer.dart app a lot nicer. There's lots of dart2js hints and warning that are emitted when you run pub deploy on a polymer.dart app.

Luckily, we have top developers working on making this nicer. :)

@DartBot
Copy link
Author

DartBot commented Aug 26, 2013

This comment was originally written by david.elbaz...@gmail.com


Hum.. Very strange.. Even in Chrome it doesn't work and I have the same error in the Console !

@sigmundch
Copy link
Member

there might be some small detail we are doing differently. David/Seth, can you both past here what does your build.dart look like?

@DartBot
Copy link
Author

DartBot commented Aug 26, 2013

This comment was originally written by david.elbaze.9...@gmail.com


Here my code :

import 'package:polymer/component_build.dart';
import 'dart:io';

main() {
  var args = new Options().arguments;
  args.addAll(['--', '--deploy']); // Note: the --deploy is what makes this work
  build(args, ['web/index.html']);
}

@sigmundch
Copy link
Member

Thanks!

mm... still not sure. I'm going to ask you more questions to see if we can figure out what's wrong.

It seems that your code layout is different than the one in Seth's example, but it might be the more common layout. Most applications typically have this layout:

|- web/
| |- index.html
| '- ... more html and .dart files
|
' build.dart

What does your tree look like? (or if you have the code available somewhere, feel free to include the link here and we can take a closer look).

With the above layout, calling build.dart (with the --deploy option) should generate an out folder under 'web/out' that has the code you can use for deployment. Is the code being generated there?

@DartBot
Copy link
Author

DartBot commented Aug 26, 2013

This comment was originally written by david.elba...@gmail.com


Yeah, I forget to tell it...

My tree :
deploy_to_javascript
|
| -packages
| -pubspec.lock
| -pubspec.yaml
| -deploy
| -web
| | -out
| | -index.html
| | -my_element.dart
| | -my_element.html
| -build.dart

I have code in the out/ directory, this code work fine in dartium.

@sigmundch
Copy link
Member

Ok - so the code under web/out/ works, that's great! That's currently what polymer supports.

I've not tried using 'pub deploy' with the app generated in out/, is that what's failing for you? If so, you might have to compile the application by hand with dart2js (the main entrypoint will be web/out/index.html_bootstrap.dart) and ship your html and .js file for now.

The good news is that I'm actively working on making this better. I'm switching our compiler so we can integrate it directly with 'pub deploy' (see issue #12511).

@DartBot
Copy link
Author

DartBot commented Aug 26, 2013

This comment was originally written by david.elbaze....@gmail.com


Yep. When I do the pub deploy, it generate code, i have no error. But when i lauch the application in Chrome or Dartium, i have the error.

I'll try to compile by hand in few minutes, i'll tell you if it fail or not.

PS : I love your job and what you do, it's very interesting. (I'm a student in software engineering)

@DartBot
Copy link
Author

DartBot commented Aug 26, 2013

This comment was originally written by david.elba...@gmail.com


I didn't sucess to compile & execute my deployed / dart2jsED code in Chrome or Dartium :/

@DartBot
Copy link
Author

DartBot commented Aug 26, 2013

This comment was originally written by david.elba...@gmail.com


Hum. It work when I compile with dart2js manually dart files that are in web/out/ :)

@sethladd
Copy link
Contributor

sethladd commented Sep 3, 2013

Moving to pub, as per Bob's suggestion.


Removed Area-Polymer label.
Added Area-Pub label.

@sethladd
Copy link
Contributor

sethladd commented Sep 3, 2013

Bumping to high, as I suspect we'll get this done for 1.0


Removed Priority-Unassigned label.
Added Priority-High label.

@munificent
Copy link
Member

Added this to the M8 milestone.

@sigmundch
Copy link
Member

FYI - Update on polymer's perspective, we switched over the entire build process to use barback transformers. I hope that once pub-build is implemented this will "just work (tm)" =)

@sigmundch
Copy link
Member

Marked this as blocking #13959.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures labels Oct 22, 2013
@DartBot DartBot added this to the M8 milestone Oct 22, 2013
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#626.

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
Projects
None yet
Development

No branches or pull requests

4 participants