Skip to content

Problem generating JS for the Dart samples #2367

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
DartBot opened this issue Mar 31, 2012 · 15 comments
Closed

Problem generating JS for the Dart samples #2367

DartBot opened this issue Mar 31, 2012 · 15 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P0 A serious issue requiring immediate resolution

Comments

@DartBot
Copy link

DartBot commented Mar 31, 2012

This issue was originally filed by [email protected]


--What steps will reproduce the problem?

  1. Open (any) sample
  2. Click run

--What is the expected output? What do you see instead?
I expected to see Dartium or a browser with the apps code running inside it, Rather I saw an error message appear.

--In Dartium, enter chrome://version and paste the results here.
I don't know where to enter chrome:// (I am slightly noob-ish) so here is this:
Version 0.1.0.201203261048, Build 5845
Dart SDK version 5845, Dartium is not installed

--Put OS and machine details here.
(If you're using Linux or Mac OS, you can get this from uname -a.)
32 bit - Windows XP
Version 2002
Service Pack 3

Intel Pentium
processor 1.60GHz
798 MHz, 0.99 GB of RAM
1 core (I believe)

--Please provide any additional information below.
    "
     'Launching sunflower.html' has encountered a problem.

     org.eclipse.core.runtime.CoreException: Failure to launch - unable to generate JavaScript for sunflower.html.
     
     Please see console for more details.
     Failure to launch - unable to generate JavaScript for sunflower.html.
     
     Please see console for more details.
    "
This is the details (not the console details) for the error. The console remains with the one-line compiling status "Generating JavaScript". It happens every single time I try, and I have tried re-downloading Java and Dart.
I just check and Dartium is not, and cannot be installed to Windows just yet. So I changed the launch browser to a very updated version of Mozilla Firefox. The same thing popped up.
I also downloaded the folder/ZIP folder into ..\Program Files\ (in its own folder). Maybe this is the cause of the issue? I noticed my RAM is pretty low. I also did NOT restart my computer after downloading the software.
-Steve

@DartBot
Copy link
Author

DartBot commented Apr 2, 2012

This comment was originally written by [email protected]


cc @danrubel.
cc @devoncarew.
cc @keertip.
Removed Area-Dartium label.
Added Area-Editor label.

@danrubel
Copy link

danrubel commented Apr 2, 2012

Kasper:
I believe that this is a Frog problem when run from the SDK.
Are there buildbot tests that run Frog on samples to assert no exceptions?
When can/should we switch to using leg or dart2js?


Set owner to @kasperl.
Changed the title to: "Problem generating JS for the Dart samples".

@dgrove
Copy link
Contributor

dgrove commented Apr 3, 2012

FWIW, I tried this on a windows 7 machine here, and had no problems.

@devoncarew
Copy link
Member

Issue #2456 has been merged into this issue.

@devoncarew
Copy link
Member

We're getting a lot of reports in on this - I'm fairly certain it's an issue with frog/dart2js not running on windows in the context of the SDK.


Removed Priority-Medium, Area-Editor labels.
Added Priority-High, Area-Dart2JS labels.

@devoncarew
Copy link
Member

I don't know if this helps narrow down the issue, but when compiling an test.dart file:

void main() {
  print("Hello World");
}

from the dart-sdk directory, using the bin/frog command on the mac I get no warnings and a test.dart.js file is created correctly.

On windows w/ the same setup, a test.dart.js file is also created but I get several compilation warnings:

C:/temp/dart/dart-sdk/bin/../lib/core/frog/expect.dart:219:24: warning: no matching constructor for Set
    final missingSet = new Set.from(expected);
                       ^^^^^^^^^^^^^^^^^^^^^^
C:/temp/dart/dart-sdk/bin/../lib/core/frog/expect.dart:221:22: warning: no matching constructor for Set
    final extraSet = new Set.from(actual);
                     ^^^^^^^^^^^^^^^^^^^^
C:/temp/dart/dart-sdk/bin/../lib/core/frog/future.dart:168:14: warning: no matching constructor for Future_List
      return new Future<List>.immediate(const []);
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C:/temp/dart/dart-sdk/bin/../lib/coreimpl/frog/hash_map_set.dart:324:12: warning: no matching constructor for Set
    return new Set<E>.from(other).containsAll(this);
           ^^^^^^^^^^^^^^^^^^^^^^
C:/temp/dart/dart-sdk/bin/../lib/coreimpl/frog/string_buffer.dart:56:16: warning: no matching constructor for dart_core_String
    return add(new String.fromCharCodes([charCode]));
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C:/temp/dart/dart-sdk/bin/../lib/coreimpl/frog/string_base.dart:18:5: warning: no matching constructor for ListFactory
    new ListFactory.from(charCodes); // ensure List.from is generated
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@dgrove
Copy link
Contributor

dgrove commented Apr 7, 2012

I did some binary searching today, and this showed up between r5925 and r5933. This isn't a VM problem - I switched the VM's, and had the same results.

r5926 was the big move to lib/compiler, and I suspect it's there.

I'll take this one.


cc @efortuna.
Set owner to @dgrove.
Removed Priority-High label.
Added Priority-Critical label.

@efortuna
Copy link
Contributor

efortuna commented Apr 7, 2012

FYI: it's in r5926-5927, and also add the few character change in r5929 so that it actually builds. As we already suspected, it's in these changes somewhere.

@DartBot
Copy link
Author

DartBot commented Apr 8, 2012

This comment was originally written by [email protected]


windows 7 sdk 32-bit
frogc.bat works on the following
void main() { print("Hello World");}

does not work if import dart:html added
#import('dart:html');
void main() { print("Hello World");}
get following error
C:\webstuff\dart\dart-sdk\bin>frogc test.dart
C:/webstuff/dart/dart-sdk/bin/../lib/html/html_frog.dart:32036:3: error: duplicate method definition of ""
  factory Float64Array(int length) => _F64(length);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C:/webstuff/dart/dart-sdk/bin/../lib/html/html_frog.dart:32037:3: error: duplicate method definition of "fromList"
  factory Float64Array.fromList(List<num> list) => _F64(ensureNative(list));
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
etc

@dgrove
Copy link
Contributor

dgrove commented Apr 10, 2012

So, this is interesting.

in r5933, these versions of the SDK work:
  mac, linux, windows with the Debug_ia32 VM in the SDK all work fine.

Windows SDK with the release_ia32 VM has the warnings above.

Sending this to Siva, because we shouldn't have an differences between the Debug and Release VM's.

I carefully inspected the changes at r5926/7, and can't see anything other than a VM issue that might explain this.


cc @iposva-google.
Set owner to @a-siva.
Removed Area-Dart2JS label.
Added Area-VM label.

@dgrove
Copy link
Contributor

dgrove commented Apr 11, 2012

Issue #2430 has been merged into this issue.

@a-siva
Copy link
Contributor

a-siva commented Apr 11, 2012

We currently found an issue with the scanner which allows the '\r' character to be included into a literal token. This causes issues when we convert the literal into an integer. I have a workspace (top of tree) with a fix for the scanner issue and this problem described above does not happen in that build.

@a-siva
Copy link
Contributor

a-siva commented Apr 19, 2012

Any updates on whether this is fixed?


Added Accepted label.

@devoncarew
Copy link
Member

Your CL did fix the issue - we're able to generate JS on windows again. Thanks!

@a-siva
Copy link
Contributor

a-siva commented Apr 20, 2012

Added Fixed label.

@DartBot DartBot added Type-Defect P0 A serious issue requiring immediate resolution area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Apr 20, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P0 A serious issue requiring immediate resolution
Projects
None yet
Development

No branches or pull requests

6 participants