ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

Compilation failing when transitive dependencies exist #480

Closed jvasileff closed 9 years ago

jvasileff commented 9 years ago

With a new project created with ceylon new hello-world, and with the following module.ceylon:

module com.example.helloworld "1.0.0" {
    import ceylon.test "1.1.1";
    // or any other module that has an import
}

I get:

$ ceylon compile-js
ceylon compile-js: null
java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
        at java.util.ArrayList$Itr.next(ArrayList.java:851)
        at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
        at com.redhat.ceylon.compiler.typechecker.analyzer.ModuleValidator.verifyModuleDependencyTree(ModuleValidator.java:175)
        at com.redhat.ceylon.compiler.typechecker.analyzer.ModuleValidator.verifyModuleDependencyTree(ModuleValidator.java:86)
        at com.redhat.ceylon.compiler.typechecker.TypeChecker.executePhases(TypeChecker.java:149)
        at com.redhat.ceylon.compiler.typechecker.TypeChecker.process(TypeChecker.java:127)
        at com.redhat.ceylon.compiler.js.CeylonCompileJsTool.run(CeylonCompileJsTool.java:319)
        at com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:368)
        at com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:305)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at com.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:113)
        at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:40)
        at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:33)
        at com.redhat.ceylon.launcher.Launcher.main(Launcher.java:26)

The error does not appear when the transitive dependencies are explicitly imported:

module com.example.helloworld "1.0.0" {
    import ceylon.collection "1.1.1";
    import ceylon.test "1.1.1";
}