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

spawnUri in dart2js does not generate the corresponding .dart.js file. #14984

Closed
DartBot opened this issue Nov 9, 2013 · 10 comments
Closed

spawnUri in dart2js does not generate the corresponding .dart.js file. #14984

DartBot opened this issue Nov 9, 2013 · 10 comments
Assignees
Labels
closed-as-intended Closed as the reported issue is expected behavior
Milestone

Comments

@DartBot
Copy link

DartBot commented Nov 9, 2013

This issue was originally filed by [email protected]


I'm running Dart Editor version 0.8.10_r30107 (STABLE) and Dart SDK version 0.8.10.10_r30107.
I saw issue #9422 been fixed and gave my sample code a try.However,It doesn't work in dart2js. I found the dart2js compiler did not generate the corresponding '.dart.js' file and the chrome dev tool console output:
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:3030/spawn_uri/web/xxx.dart.js

After i manually run 'dart2js --out=xxx.dart.js xxx.dart' cmd under my source code directory and run the sample code again, it finally works.
Maybe it has something to do with Issue #8440?

P.S. main.dart has such a code line,
Isolate.spawnUri(Uri.parse("worker.dart"), [], response.sendPort);

Run html file via 'run as javascript' in dart editor and you will find such new generated files:
+main.dart.js
+main.dart.js.deps
+main.dart.js.map
+main.dart.precompiled.js
But it does not automatically generate such files,
-worker.dart.js
-worker.dart.js.deps
-worker.dart.js.map
-worker.dart.precompiled.js
Or just importing worker.dart into main.dart file and generate a single .dart.js file as a whole.


Attachment:
spawnuri.rar (3.75 KB)

@anders-sandholm
Copy link
Contributor

Not sure if dart2js, or isolate issue.


Added Area-Dart2JS, Library-Isolate, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Nov 16, 2013

This comment was originally written by [email protected]


hi,it's an isolate issue,because i tested other codes without using spawnUri() and it worked.

@DartBot
Copy link
Author

DartBot commented Nov 16, 2013

This comment was originally written by [email protected]


cc @floitschG.

@peter-ahe-google
Copy link
Contributor

You need to compile worker.dart yourself.


Added AsDesigned label.

@floitschG
Copy link
Contributor

Reopening and assigning to the Editor team. Maybe there are ways to make this easier.


Removed Area-Dart2JS, Library-Isolate labels.
Added Area-Editor, Triaged labels.

@clayberg
Copy link

cc @devoncarew.
Set owner to @keertip.
Added this to the Later milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Jan 20, 2014

This comment was originally written by @sethladd


It would be cool to right-click on a .dart file and run dart2js on it.

@DartBot
Copy link
Author

DartBot commented Jan 20, 2014

This comment was originally written by @sethladd


We can probably punt to pub build for this (which, at this moment, doesn't compile the worker script, but it could/should)

I opened https://code.google.com/p/dart/issues/detail?id=16210 to track.

@clayberg
Copy link

clayberg commented Apr 9, 2014

Removed this from the Later milestone.
Added this to the 1.4 milestone.

@keertip
Copy link
Contributor

keertip commented May 1, 2014

With the editor now supporting pub serve and pub build, and being able to configure dart2js through pubspec, the user can compile to js as needed.


Added AsDesigned label.

@DartBot DartBot added Type-Defect closed-as-intended Closed as the reported issue is expected behavior labels May 1, 2014
@DartBot DartBot added this to the 1.4 milestone May 1, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-as-intended Closed as the reported issue is expected behavior
Projects
None yet
Development

No branches or pull requests

6 participants