Skip to content
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

Upgrade sbt to 0.13.8; move completeness package to scala-2.11; enable fatal-warnings #176

Merged
merged 1 commit into from
Sep 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ lazy val examples = project in file("examples") dependsOn (root % "test->test;co
)
)

scalacOptions in ThisBuild := Seq("-feature", "-unchecked", "-deprecation", "-encoding", "utf8")
scalacOptions in ThisBuild := Seq("-feature", "-unchecked", "-deprecation", "-encoding", "utf8", "-Xfatal-warnings")

scalaVersion in ThisBuild := "2.11.6"

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.6
sbt.version=0.13.8
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ trait CompletenessKit extends JUnitSuite {
for (member <- members; alt <- member.asTerm.alternatives) yield {
val m = alt.asMethod
// multiple parameter lists in case of curried functions
val paramListStrs = for (paramList <- m.paramss) yield {
val paramListStrs = for (paramList <- m.paramLists) yield {
paramList.map(
symb => removePackage(symb.typeSignature.toString.replaceAll(",(\\S)", ", $1"))
).mkString("(", ", ", ")")
Expand All @@ -94,7 +94,7 @@ trait CompletenessKit extends JUnitSuite {
val superTypes = tp.baseClasses.map(_.asType.toType).filter(!ignoredSuperTypes(_))
// declarations: => only those declared in
// members => also those of superclasses
methodMembersToMethodStrings(superTypes.flatMap(_.declarations).filter {
methodMembersToMethodStrings(superTypes.flatMap(_.decls).filter {
m =>
m.isMethod && m.isPublic &&
m.annotations.forall(_.toString != "java.lang.Deprecated") // don't check deprecated classes
Expand All @@ -113,7 +113,7 @@ trait CompletenessKit extends JUnitSuite {
*/
private def getPublicInstanceAndCompanionMethods(tp: Type): Iterable[String] =
getPublicInstanceMethods(tp) ++
getPublicInstanceMethods(tp.typeSymbol.companionSymbol.typeSignature)
getPublicInstanceMethods(tp.typeSymbol.companion.typeSignature)

private def javaMethodSignatureToScala(s: String): String = {
val r = s.replaceAllLiterally("Long, Long, TimeUnit", "Duration, Duration")
Expand Down Expand Up @@ -206,12 +206,12 @@ trait CompletenessKit extends JUnitSuite {

@Ignore // because spams output
@Test def printJavaStaticMethods(): Unit = {
printMethodSet(s"Static methods of $rxJavaType", rxJavaType.typeSymbol.companionSymbol.typeSignature)
printMethodSet(s"Static methods of $rxJavaType", rxJavaType.typeSymbol.companion.typeSignature)
}

@Ignore // because spams output
@Test def printScalaCompanionMethods(): Unit = {
printMethodSet(s"Companion methods of $rxScalaType", rxScalaType.typeSymbol.companionSymbol.typeSignature)
printMethodSet(s"Companion methods of $rxScalaType", rxScalaType.typeSymbol.companion.typeSignature)
}

@Ignore // because spams output
Expand Down