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

Update scala 2.13.0 to 2.13.4 #141

Merged
merged 6 commits into from
Jun 22, 2021
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ scala:
- 2.10.7
- 2.11.12
- 2.12.8
- 2.13.0
- 2.13.4
jdk:
- oraclejdk8
- openjdk8
Expand Down
10 changes: 9 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lazy val project = Project("project", file("."))
description := "A Scala-friendly wrapper companion for Typesafe config",
startYear := Some(2013),
scalaVersion := "2.12.14",
crossScalaVersions := Seq("2.10.7", "2.11.12", scalaVersion.value, "2.13.0"),
crossScalaVersions := Seq("2.10.7", "2.11.12", scalaVersion.value, "2.13.4"),
scalacOptions ++= Seq(
"-feature",
"-deprecation",
Expand All @@ -38,6 +38,14 @@ lazy val project = Project("project", file("."))
}
}
},
unmanagedSourceDirectories in Test ++= {
(unmanagedSourceDirectories in Test).value.map { dir =>
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => file(dir.getPath ++ "-2.13+")
case _ => file(dir.getPath ++ "-2.13-")
}
}
},
libraryDependencies ++=
(if (scalaVersion.value.startsWith("2.10"))
Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resolvers += "Typesafe Repository" at "https://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala-2.13+/macrocompat/bundle.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package macrocompat

class bundle
class bundle extends scala.annotation.Annotation
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trait CollectionReaders {
val entryConfig = entry.atPath(DummyPathValue)
builder += entryReader.read(entryConfig, DummyPathValue)
}
builder.result
builder.result()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait CollectionReaders {
val entryConfig = entry.atPath(DummyPathValue)
builder += entryReader.read(entryConfig, DummyPathValue)
}
builder.result
builder.result()
}
}

Expand Down
23 changes: 23 additions & 0 deletions src/test/scala-2.13+/net/ceedubs/ficus/Issue82Spec.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package net.ceedubs.ficus

import net.ceedubs.ficus.Ficus._
import net.ceedubs.ficus.readers.ArbitraryTypeReader._
import com.typesafe.config._
import org.specs2.mutable.Specification

class Issue82Spec extends Specification {
"Ficus config" should {
"not throw `java.lang.ClassCastException`" in {
case class TestSettings(val `foo-bar`: Long, `foo`: String)
val config = ConfigFactory.parseString("""{ foo-bar: 3, foo: "4" }""")
config.as[TestSettings] must not(throwA[java.lang.ClassCastException])
}

"""should not assign "foo-bar" to "foo"""" in {
case class TestSettings(val `foo-bar`: String, `foo`: String)
val config = ConfigFactory.parseString("""{ foo-bar: "foo-bar", foo: "foo" }""")
val settings = config.as[TestSettings]
(settings.`foo-bar` mustEqual "foo-bar") and (settings.`foo` mustEqual "foo")
}
}
}