ceylon/ceylon-compiler — Issue #345: ceylon-tests.car build target is broken
Author: soheilhassasyeganeh
Created: 2012-01-26 01:02:57+00:00
State: open

Hi guys,

Running the tests, I get the following error:
ceylon-tests.car:
[delete] Deleting directory /home/soheil/Projects/ceylon/ceylon-compiler/build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1
[mkdir] Created dir: /home/soheil/Projects/ceylon/ceylon-compiler/build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1
[jar] Building jar: /home/soheil/Projects/ceylon/ceylon-compiler/build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1/com.redhat.ceylon.compiler.java.test.ceylon-0.1.car
[ceylonc] Could not find distribution repo, using /home/soheil/.ceylon/repo
[ceylonc] warning: Invalid CEYLON_HOME/repo: /home/soheil/Projects/ceylon/ceylon-compiler/build/bin/../repo
[ceylonc] An exception has occurred in the compiler (ceylonc 0.1 'Newton').
[ceylonc] java.lang.NullPointerException
[ceylonc]	at java.io.Reader.(Reader.java:78)
[ceylonc]	at java.io.InputStreamReader.(InputStreamReader.java:72)
[ceylonc]	at com.redhat.ceylon.cmr.impl.IOUtils.readSha1(IOUtils.java:152)
[ceylonc]	at com.redhat.ceylon.cmr.impl.AbstractNodeRepository.checkSHA(AbstractNodeRepository.java:227)
[ceylonc]	at com.redhat.ceylon.cmr.impl.AbstractNodeRepository.checkSHA(AbstractNodeRepository.java:223)
[ceylonc]	at com.redhat.ceylon.cmr.impl.RootRepository.checkSHA(RootRepository.java:158)
[ceylonc]	at com.redhat.ceylon.cmr.impl.AbstractNodeRepository.getLeafNode(AbstractNodeRepository.java:201)
[ceylonc]	at com.redhat.ceylon.cmr.impl.RootRepository.getArtifact(RootRepository.java:58)
[ceylonc]	at com.redhat.ceylon.cmr.api.AbstractRepository.getArtifact(AbstractRepository.java:42)
[ceylonc]	at com.redhat.ceylon.compiler.java.loader.CeylonEnter.addModuleToClassPath(CeylonEnter.java:221)
[ceylonc]	at com.redhat.ceylon.compiler.java.tools.LanguageCompiler.loadModuleFromSource(LanguageCompiler.java:320)
[ceylonc]	at com.redhat.ceylon.compiler.java.tools.LanguageCompiler.loadCompiledModules(LanguageCompiler.java:272)
[ceylonc]	at com.redhat.ceylon.compiler.java.tools.LanguageCompiler.parseFiles(LanguageCompiler.java:259)
[ceylonc]	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:807)
[ceylonc]	at com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:457)
[ceylonc]	at com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:381)
[ceylonc]	at com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:371)
[ceylonc]	at com.redhat.ceylon.compiler.java.Main.compile(Main.java:50)
[ceylonc]	at com.redhat.ceylon.compiler.java.Main.main(Main.java:69)

I checked out master of all ceylon projects, cleaned the repo's, built, and published them. The problem is caused because it cannot find the "com.redhat.ceylon.compiler.java.test.ceylon" module. The com.redhat.ceylon.compiler.java.test.ceylon-0.1.car file exits in the build/ceylon-cars folder.

I could get it to work by running the compiler manually, and adding the ceylon-cars as the repository:
```ceylonc -rep /home/soheil/Projects/ceylon/ceylon-compiler/build/ceylon-cars -cp /home/soheil/Projects/ceylon/ceylon-compiler/lib/junit-4.9b2.jar -src /home/soheil/Projects/ceylon/ceylon-compiler/test-src -out /home/soheil/Projects/ceylon/ceylon-compiler/build/ceylon-cars test-src/com/redhat/ceylon/compiler/java/test/ceylon/*.ceylon
```

This is the content of my local repo in my home
.ceylon
.ceylon/repo
.ceylon/repo/ceylon
.ceylon/repo/ceylon/language
.ceylon/repo/ceylon/language/0.1
.ceylon/repo/ceylon/language/0.1/ceylon.language-0.1.car
.ceylon/repo/ceylon/language/0.1/ceylon.language-0.1.car.sha1
.ceylon/repo/ceylon/language/0.1/ceylon.language-0.1.src
.ceylon/repo/ceylon/language/0.1/ceylon.language-0.1.src.sha1
.ceylon/repo/com
.ceylon/repo/com/redhat
.ceylon/repo/com/redhat/ceylon
.ceylon/repo/com/redhat/ceylon/ant
.ceylon/repo/com/redhat/ceylon/ant/0.1
.ceylon/repo/com/redhat/ceylon/ant/0.1/com.redhat.ceylon.ant-0.1.jar
.ceylon/repo/com/redhat/ceylon/ant/0.1/com.redhat.ceylon.ant-0.1.jar.sha1
.ceylon/repo/com/redhat/ceylon/compiler
.ceylon/repo/com/redhat/ceylon/compiler/java
.ceylon/repo/com/redhat/ceylon/compiler/java/0.1
.ceylon/repo/com/redhat/ceylon/compiler/java/0.1/com.redhat.ceylon.compiler.java-0.1.jar
.ceylon/repo/com/redhat/ceylon/compiler/java/0.1/com.redhat.ceylon.compiler.java-0.1.jar.sha1
.ceylon/repo/com/redhat/ceylon/module-resolver
.ceylon/repo/com/redhat/ceylon/module-resolver/0.1
.ceylon/repo/com/redhat/ceylon/module-resolver/0.1/com.redhat.ceylon.module-resolver-0.1.jar
.ceylon/repo/com/redhat/ceylon/module-resolver/0.1/com.redhat.ceylon.module-resolver-0.1.jar.sha1
.ceylon/repo/com/redhat/ceylon/module-resolver/0.1/com.redhat.ceylon.module-resolver-0.1.src
.ceylon/repo/com/redhat/ceylon/module-resolver/0.1/com.redhat.ceylon.module-resolver-0.1.src.sha1
.ceylon/repo/com/redhat/ceylon/typechecker
.ceylon/repo/com/redhat/ceylon/typechecker/0.1
.ceylon/repo/com/redhat/ceylon/typechecker/0.1/com.redhat.ceylon.typechecker-0.1.jar
.ceylon/repo/com/redhat/ceylon/typechecker/0.1/com.redhat.ceylon.typechecker-0.1.jar.sha1

This is the content of the ceylon-cars:
build/ceylon-cars
build/ceylon-cars/com
build/ceylon-cars/com/redhat
build/ceylon-cars/com/redhat/ceylon
build/ceylon-cars/com/redhat/ceylon/compiler
build/ceylon-cars/com/redhat/ceylon/compiler/java
build/ceylon-cars/com/redhat/ceylon/compiler/java/test
build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon
build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1
build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1/com.redhat.ceylon.compiler.java.test.ceylon-0.1.car
build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1/com.redhat.ceylon.compiler.java.test.ceylon-0.1.car.sha1
build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1/com.redhat.ceylon.compiler.java.test.ceylon-0.1.src
build/ceylon-cars/com/redhat/ceylon/compiler/java/test/ceylon/0.1/com.redhat.ceylon.compiler.java.test.ceylon-0.1.src.sha1

PS. I am a new to ceylon, and I apologize in advance if it is my local setup's problem.

Cheers,
Soheil