Skip to content

Commit

Permalink
Update versions and drop Scala 2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ekrich committed Sep 20, 2022
1 parent 9a6b9a9 commit 7d96f16
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ jobs:
check-lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: ./scripts/check-lint.sh
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
JAVA_OPTS: -Xms2G -Xmx4G -Xss6M -XX:+UseG1GC -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
name: Test using Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
Expand Down
26 changes: 7 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,21 @@ val isScala3 = Def.setting {
}
}

val scala211 = "2.11.12"
val scala212 = "2.12.16"
val scala212 = "2.12.17"
val scala213 = "2.13.8"
val scala300 = "3.2.0"
val scala3 = "3.2.0"

val javaTime = "1.1.9"
val scCompat = "2.8.1"

val versionsBase = Seq(scala211, scala212, scala213)
val versions = versionsBase :+ scala300
val versionsBase = Seq(scala212, scala213)
val versions = versionsBase :+ scala3

ThisBuild / scalaVersion := scala213
ThisBuild / scalaVersion := scala3
ThisBuild / crossScalaVersions := versions
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / mimaFailOnNoPrevious := false
ThisBuild / resolvers += Resolver.sonatypeRepo("snapshots")
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots")

Compile / packageBin / packageOptions +=
Package.ManifestAttributes("Automatic-Module-Name" -> "org.ekrich.sconfig")
Expand Down Expand Up @@ -113,18 +112,7 @@ lazy val sconfig = crossProject(JVMPlatform, NativePlatform, JSPlatform)
if (isScala3.value) dotcOpts else scalacOpts
},
libraryDependencies += "org.scala-lang.modules" %%% "scala-collection-compat" % scCompat,
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-s", "-v"),
// dottydoc really doesn't work at all right now
// also avoid 2.11 and Java 9+ https://github.com/scala/bug/issues/11635
Compile / doc / sources := {
val old = (Compile / doc / sources).value
val is211 =
CrossVersion.partialVersion(scalaVersion.value) == Some((2, 11))
if (isScala3.value || is211)
Seq()
else
old
}
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-s", "-v")
)
.jvmSettings(
crossScalaVersions := versions,
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// To test snapshots
resolvers += Resolver.sonatypeRepo("snapshots")
resolvers ++= Resolver.sonatypeOssRepos("snapshots")

// versions
val crossVer = "1.2.0"
Expand All @@ -18,4 +18,4 @@ addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % crossVer)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.2")
5 changes: 3 additions & 2 deletions sconfig/shared/src/main/scala/org/ekrich/config/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ import scala.annotation.varargs
*
* <p> Convert a <code>Config</code> to a JSON or HOCON string by calling
* [[#root root]] to get the [[ConfigObject]] and then call
* [[ConfigValue!.render:String* render]] on the root object,
* [[ConfigValue!.render():String render]] on the root object,
* <code>myConfig.root.render</code>. There's also a variant
* [[ConfigValue!.render(options:org\.ekrich\.config\.ConfigRenderOptions)* render(ConfigRenderOptions)]]
* inherited from [[ConfigValue]] which allows you to control the format of the
Expand All @@ -130,9 +130,10 @@ import scala.annotation.varargs
* if you load, modify, and re-save a config file, it will be substantially
* reformatted.
*
* <p> As an alternative to [[ConfigValue!.render:String* render]], the
* <p> As an alternative to [[ConfigValue!.render render]], the
* <code>toString</code> method produces a debug-output-oriented representation
* (which is not valid JSON).
* Note: no arg render links do not link correctly. See https://github.com/lampepfl/dotty/issues/14212
*
* <p> Java serialization is supported as well for <code>Config</code> and all
* subtypes of <code>ConfigValue</code>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object DefaultTransformer {
case e: NumberFormatException =>
// oh well.
}
value
retVal
case NULL =>
if (s == "null") // this case needs test
retVal = new ConfigNull(value.origin)
Expand Down

0 comments on commit 7d96f16

Please sign in to comment.