Build failing on Mac OS X (snow leopard) #35

Closed
mneedham opened this Issue Feb 18, 2012 · 13 comments

Projects

None yet

3 participants

@mneedham

Hey,

I tried to run the build 'mvn clean package' on my machine but it fails many of the tests:

Results :

Tests in error:
Convert_Creates_Files(com.mysema.scalagen.ConverterTest)
Convert_Creates_File_with_Content(com.mysema.scalagen.ConverterTest)
Dump(com.mysema.scalagen.ScalaDumpVisitorTest)
Compile(com.mysema.scalagen.ScalaCompilationTest)
Control(com.mysema.scalagen.SerializationTest)
AbstractCodeWriter(com.mysema.scalagen.SerializationTest)
ArrayConstructorExpression(com.mysema.scalagen.SerializationTest)
Bean(com.mysema.scalagen.SerializationTest)
Bean2(com.mysema.scalagen.SerializationTest)
BeanWithUnderscores(com.mysema.scalagen.SerializationTest)
Casts(com.mysema.scalagen.SerializationTest)
ConstantImpl(com.mysema.scalagen.SerializationTest)
DateTimeExpression(com.mysema.scalagen.SerializationTest)
IfElse(com.mysema.scalagen.SerializationTest)
Immutable(com.mysema.scalagen.SerializationTest)
Modifiers(com.mysema.scalagen.SerializationTest)
Ops(com.mysema.scalagen.SerializationTest)
Reserved(com.mysema.scalagen.SerializationTest)
Resource(com.mysema.scalagen.SerializationTest)
SimpleCompiler(com.mysema.scalagen.SerializationTest)
SwitchCase(com.mysema.scalagen.SerializationTest)
TryCatch(com.mysema.scalagen.SerializationTest)
WithStaticAndInstance(com.mysema.scalagen.SerializationTest)

Tests run: 53, Failures: 0, Errors: 23, Skipped: 1

Weirdly when I look in the target/surefire-reports directory I see an entry for each failed test but there's pretty much no information in there as to why they failed..

@timowest
Owner

Do you get the same results when you run mvn clean test directly in the scalagen subdirectory?

@mneedham

Tried it directly in the sub directory:

T E S T S

Running com.mysema.scalagen.CompanionObjectTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.419 sec
Running com.mysema.scalagen.ConverterTest
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.241 sec <<< FAILURE!
Running com.mysema.scalagen.ScalaDumpVisitorTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.023 sec <<< FAILURE!
Running com.mysema.scalagen.HelpersTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
Running com.mysema.scalagen.BeanPropertiesTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec
Running com.mysema.scalagen.ConstructorsTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec
Running com.mysema.scalagen.ReturnsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running com.mysema.scalagen.ScalaCompilationTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.185 sec <<< FAILURE!
Running com.mysema.scalagen.SerializationTest
Tests run: 36, Failures: 0, Errors: 19, Skipped: 1, Time elapsed: 0.406 sec <<< FAILURE!

Results :

Tests in error:
Convert_Creates_Files(com.mysema.scalagen.ConverterTest)
Convert_Creates_File_with_Content(com.mysema.scalagen.ConverterTest)
Dump(com.mysema.scalagen.ScalaDumpVisitorTest)
Compile(com.mysema.scalagen.ScalaCompilationTest)
Control(com.mysema.scalagen.SerializationTest)
AbstractCodeWriter(com.mysema.scalagen.SerializationTest)
ArrayConstructorExpression(com.mysema.scalagen.SerializationTest)
Bean(com.mysema.scalagen.SerializationTest)
Bean2(com.mysema.scalagen.SerializationTest)
BeanWithUnderscores(com.mysema.scalagen.SerializationTest)
Casts(com.mysema.scalagen.SerializationTest)
ConstantImpl(com.mysema.scalagen.SerializationTest)
DateTimeExpression(com.mysema.scalagen.SerializationTest)
IfElse(com.mysema.scalagen.SerializationTest)
Immutable(com.mysema.scalagen.SerializationTest)
Modifiers(com.mysema.scalagen.SerializationTest)
Ops(com.mysema.scalagen.SerializationTest)
Reserved(com.mysema.scalagen.SerializationTest)
Resource(com.mysema.scalagen.SerializationTest)
SimpleCompiler(com.mysema.scalagen.SerializationTest)
SwitchCase(com.mysema.scalagen.SerializationTest)
TryCatch(com.mysema.scalagen.SerializationTest)
WithStaticAndInstance(com.mysema.scalagen.SerializationTest)

Tests run: 53, Failures: 0, Errors: 23, Skipped: 1

@timowest
Owner

Btw, which Maven version are you using? The only difference I can come up with is some kind of file resolving difference, but I am not how I could fix it in the code.

@mangolas
Contributor

I was able to verify that build indeed fails on my OS X (Lion)

For example the ConverterTest fails for:
Convert_Creates_Files(com.mysema.scalagen.ConverterTest) Time elapsed: 0.272 sec <<< ERROR!
java.lang.NoClassDefFoundError: com/mysema/scalagen/Types$field$ (wrong name: com/mysema/scalagen/Types$Field$)

@timowest
Owner

Might this happen because OS X uses case-insensitive file names? Types$Field and Types$field, both objects, might cause this.

@timowest timowest added a commit that referenced this issue Feb 26, 2012
@timowest #35 fixed classname clash 358f192
@timowest
Owner

I fixed the classname clash now. Mark, could you verify if the build works now on your machine?

@mneedham

Alright we're down to just one test failing now...

Tests in error:
Compile(com.mysema.scalagen.ScalaCompilationTest)

Tests run: 53, Failures: 0, Errors: 1, Skipped: 1

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.287 sec <<< FAILURE!
Compile(com.mysema.scalagen.ScalaCompilationTest) Time elapsed: 7.283 sec <<< ERROR!
java.lang.NullPointerException
at japa.parser.ParseException.getMessage(ParseException.java:139)
at java.lang.Throwable.getLocalizedMessage(Throwable.java:267)
at java.lang.Throwable.toString(Throwable.java:343)
at java.lang.String.valueOf(String.java:2826)
at scala.collection.mutable.StringBuilder.append(StringBuilder.scala:185)
at scala.Tuple2.toString(Tuple2.scala:25)
at java.lang.String.valueOf(String.java:2826)
at scala.collection.mutable.StringBuilder.append(StringBuilder.scala:185)
at scala.collection.TraversableOnce$$anonfun$addString$1.apply(TraversableOnce.scala:287)
at scala.collection.immutable.Set$Set2.foreach(Set.scala:106)
at scala.collection.TraversableOnce$class.addString(TraversableOnce.scala:285)
at scala.collection.immutable.Set$Set2.addString(Set.scala:92)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:263)
at scala.collection.immutable.Set$Set2.mkString(Set.scala:92)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:265)
at scala.collection.immutable.Set$Set2.mkString(Set.scala:92)
at scala.collection.parallel.package$CompositeThrowable.(package.scala:125)
at scala.collection.parallel.package$$anon$3.alongWith(package.scala:117)
at scala.collection.parallel.Tasks$Task$class.mergeThrowables(Tasks.scala:98)
at scala.collection.parallel.ParIterableLike$Map.mergeThrowables(ParIterableLike.scala:968)
at scala.collection.parallel.Tasks$Task$class.tryMerge(Tasks.scala:84)

@timowest timowest added a commit that referenced this issue Feb 26, 2012
@timowest #35 improved Parser usage fd995cf
@timowest
Owner

Could you try again? I disabled Parser cacheing.

@mneedham

I'm getting an out of heap space error on ScalaCompilationTest. I tried putting the heap size up like so:

export MAVEN_OPTS="-Xmx2048m -Xms1024m"

But it's still happening. Any ideas?

@timowest
Owner

I think you need to expose the Xmx, Xms options directly in the surefire-plugin config.

Does the execution of the plugin still work for you?

@timowest
Owner

I just increased the memory settings for surefire.

@mneedham

Ah nice that's got it working. Didn't realise sure-fire wouldn't pick up the maven options from the environment - I've not used maven stuff much!

I ran it against some Java code I have and it seems to work reasonably well, nice work!

@timowest
Owner

Sorry for the glitches. Please report also some Java to Scala -conversion patterns you'd like that have improved. Scalagen has a very modular structure, so optional conversions can also be added easily. I just didn't yet have the time to expose the modularity via the Maven plugin.

@timowest timowest closed this Sep 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment