Add a pending test-case for showing circular api structures.

This test should pass because `ShowAPI` skips inherited members but
due to sbt/sbt#676 it fails with StackOverflowError.

This makes it a decent test-case for both showing circular api structures
and for the aforementioned bug itself.
This commit is contained in:
Grzegorz Kossakowski 2013-02-19 15:54:39 -08:00 committed by Mark Harrah
parent f885458f37
commit 289d031466
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,12 @@
logLevel := Level.Debug
incOptions ~= { _.copy(apiDebug = true) }
TaskKey[Unit]("show-apis") <<= (compile in Compile, scalaSource in Compile, javaSource in Compile) map { (a: sbt.inc.Analysis, scalaSrc: java.io.File, javaSrc: java.io.File) =>
val aApi = a.apis.internalAPI(scalaSrc / "A.scala").api
val jApi = a.apis.internalAPI(javaSrc / "test/J.java").api
import xsbt.api.DefaultShowAPI
import DefaultShowAPI._
DefaultShowAPI.showSource.show(aApi)
DefaultShowAPI.showSource.show(jApi)
}

View File

@ -0,0 +1,4 @@
# test case for http://github.com/sbt/sbt/issues/676
> compile
# fails with StackOverflowException
> show-apis

View File

@ -0,0 +1,6 @@
package test;
public class J {
public static final class J2 extends J { }
public static final class J3 extends J { }
}

View File

@ -0,0 +1,6 @@
package test
class A {
class B extends A
class C extends A
}