Skip to content

Commit cf429a2

Browse files
committed
Merge branch 'master' into update/sbt-1.4.6
2 parents 71b30a7 + 39ae333 commit cf429a2

File tree

18 files changed

+71
-65
lines changed

18 files changed

+71
-65
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
matrix:
2626
os: [ubuntu-latest]
27-
scala: [2.12.12, 2.13.3]
27+
scala: [2.13.4, 2.12.13]
2828
java: [adopt@1.11]
2929
runs-on: ${{ matrix.os }}
3030
steps:
@@ -91,7 +91,7 @@ jobs:
9191
strategy:
9292
matrix:
9393
os: [ubuntu-latest]
94-
scala: [2.13.3]
94+
scala: [2.13.4]
9595
java: [adopt@1.11]
9696
runs-on: ${{ matrix.os }}
9797
steps:
@@ -117,22 +117,22 @@ jobs:
117117
~/Library/Caches/Coursier/v1
118118
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
119119

120-
- name: Download target directories (2.12.12)
120+
- name: Download target directories (2.13.4)
121121
uses: actions/download-artifact@v2
122122
with:
123-
name: target-${{ matrix.os }}-2.12.12-${{ matrix.java }}
123+
name: target-${{ matrix.os }}-2.13.4-${{ matrix.java }}
124124

125-
- name: Inflate target directories (2.12.12)
125+
- name: Inflate target directories (2.13.4)
126126
run: |
127127
tar xf targets.tar
128128
rm targets.tar
129129
130-
- name: Download target directories (2.13.3)
130+
- name: Download target directories (2.12.13)
131131
uses: actions/download-artifact@v2
132132
with:
133-
name: target-${{ matrix.os }}-2.13.3-${{ matrix.java }}
133+
name: target-${{ matrix.os }}-2.12.13-${{ matrix.java }}
134134

135-
- name: Inflate target directories (2.13.3)
135+
- name: Inflate target directories (2.12.13)
136136
run: |
137137
tar xf targets.tar
138138
rm targets.tar

build.sbt

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,31 @@ cancelable in Global := true
99
val forIdeaImport = System.getProperty("idea.managed", "false").toBoolean && System.getProperty("idea.runid") == null
1010

1111
val silencerVersion = "1.7.1"
12-
val collectionCompatVersion = "2.1.6"
13-
val guavaVersion = "23.0"
12+
val collectionCompatVersion = "2.3.2"
13+
val guavaVersion = "23.6.1-jre"
1414
val jsr305Version = "3.0.2"
15-
val scalatestVersion = "3.2.1"
15+
val scalatestVersion = "3.2.3"
1616
val scalatestplusScalacheckVersion = "3.2.2.0"
17-
val scalacheckVersion = "1.14.3"
18-
val jettyVersion = "9.4.31.v20200723"
17+
val scalacheckVersion = "1.15.2"
18+
val jettyVersion = "9.4.35.v20201120"
1919
val mongoVersion = "4.1.1"
2020
val springVersion = "4.3.26.RELEASE"
2121
val typesafeConfigVersion = "1.4.0"
2222
val commonsIoVersion = "1.3.2"
2323
val scalaLoggingVersion = "3.9.2"
2424
val akkaVersion = "2.6.8"
2525
val monixVersion = "3.3.0"
26-
val mockitoVersion = "3.5.15"
26+
val mockitoVersion = "3.7.0"
2727
val circeVersion = "0.13.0"
28-
val upickleVersion = "1.2.0"
28+
val upickleVersion = "1.2.2"
2929
val scalajsBenchmarkVersion = "0.8.0"
3030
val slf4jVersion = "1.7.30"
3131

3232
// for binary compatibility checking
3333
val previousCompatibleVersions = Set("1.39.14")
3434

35+
Global / excludeLintKeys ++= Set(ideExcludedDirectories, ideOutputDirectory, ideBasePackages, ideSkipProject)
36+
3537
inThisBuild(Seq(
3638
organization := "com.avsystem.commons",
3739
homepage := Some(url("https://github.com/AVSystem/scala-commons")),
@@ -51,30 +53,9 @@ inThisBuild(Seq(
5153
Developer("ghik", "Roman Janusz", "r.janusz@avsystem.com", url("https://github.com/ghik")),
5254
),
5355

54-
crossScalaVersions := Seq("2.12.12", "2.13.3"),
55-
scalaVersion := crossScalaVersions.value.last,
56+
crossScalaVersions := Seq("2.13.4", "2.12.13"),
57+
scalaVersion := crossScalaVersions.value.head,
5658
compileOrder := CompileOrder.Mixed,
57-
scalacOptions ++= Seq(
58-
"-encoding", "utf-8",
59-
"-Yrangepos",
60-
"-explaintypes",
61-
"-feature",
62-
"-deprecation",
63-
"-unchecked",
64-
"-language:implicitConversions",
65-
"-language:existentials",
66-
"-language:dynamics",
67-
"-language:experimental.macros",
68-
"-language:higherKinds",
69-
"-Xfatal-warnings",
70-
"-Xlint:-missing-interpolator,-adapted-args,-unused,_",
71-
),
72-
scalacOptions ++= {
73-
if (scalaBinaryVersion.value == "2.12") Seq(
74-
"-Ycache-plugin-class-loader:last-modified",
75-
"-Ycache-macro-class-loader:last-modified",
76-
) else Seq.empty
77-
},
7859

7960
githubWorkflowTargetTags ++= Seq("v*"),
8061

@@ -121,6 +102,33 @@ inThisBuild(Seq(
121102
))
122103

123104
val commonSettings = Seq(
105+
Compile / scalacOptions ++= Seq(
106+
"-encoding", "utf-8",
107+
"-Yrangepos",
108+
"-explaintypes",
109+
"-feature",
110+
"-deprecation",
111+
"-unchecked",
112+
"-language:implicitConversions",
113+
"-language:existentials",
114+
"-language:dynamics",
115+
"-language:experimental.macros",
116+
"-language:higherKinds",
117+
"-Xfatal-warnings",
118+
"-Xlint:-missing-interpolator,-adapted-args,-unused,_",
119+
"-Ycache-plugin-class-loader:last-modified",
120+
"-Ycache-macro-class-loader:last-modified",
121+
),
122+
123+
Compile / scalacOptions ++= {
124+
if (scalaBinaryVersion.value == "2.13") Seq(
125+
"-Xnon-strict-patmat-analysis",
126+
"-Xlint:-strict-unsealed-patmat"
127+
) else Seq.empty
128+
},
129+
130+
Test / scalacOptions := (Compile / scalacOptions).value,
131+
124132
sources in(Compile, doc) := Seq.empty, // relying on unidoc
125133
apiURL := Some(url("http://avsystem.github.io/scala-commons/api")),
126134
autoAPIMappings := true,

commons-core/jvm/src/main/scala/com/avsystem/commons/concurrent/ObservableBlockingIterator.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.avsystem.commons
22
package concurrent
33

44
import java.util.concurrent.ArrayBlockingQueue
5-
65
import com.avsystem.commons.collection.CloseableIterator
76
import com.github.ghik.silencer.silent
87
import monix.execution.{Ack, Scheduler}

commons-core/src/main/scala/com/avsystem/commons/SharedExtensions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.avsystem.commons
22

33
import com.avsystem.commons.concurrent.RunNowEC
44
import com.avsystem.commons.misc._
5-
import com.github.ghik.silencer.silent
5+
import scala.annotation.nowarn
66

77
import scala.annotation.tailrec
88
import scala.collection.compat._
@@ -77,7 +77,7 @@ object SharedExtensionsUtils extends SharedExtensions {
7777
* Explicit syntax to discard the value of a side-effecting expression.
7878
* Useful when `-Ywarn-value-discard` compiler option is enabled.
7979
*/
80-
@silent
80+
@nowarn
8181
def discard: Unit = ()
8282

8383
def thenReturn[T](value: T): T = value

commons-core/src/main/scala/com/avsystem/commons/collection/CloseableIterator.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package com.avsystem.commons
22
package collection
33

4-
import java.util.function.Function
5-
64
import com.github.ghik.silencer.silent
75

6+
import java.util.function.Function
87
import scala.annotation.unchecked.uncheckedVariance
98

109
/**

commons-core/src/test/scala/com/avsystem/commons/rpc/TestRPC.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package rpc
33

44
import com.avsystem.commons.rpc.DummyRPC._
55
import com.avsystem.commons.serialization.{HasGenCodec, optionalParam, transientDefault, whenAbsent}
6-
import com.github.ghik.silencer.silent
6+
import scala.annotation.nowarn
77

88
class prepend(prefix: String) extends EncodingInterceptor[String, String] with DecodingInterceptor[String, String] {
99
def toOriginalRaw(newRaw: String): String = prefix + newRaw
@@ -27,7 +27,7 @@ object InnerRPC extends RPCCompanion[InnerRPC]
2727
trait TestRPC {
2828
def defaultNum: Int = 42
2929

30-
@silent("side-effecting nullary methods")
30+
@nowarn("msg=side-effecting nullary methods")
3131
def handle: Unit
3232

3333
def handleMore(): Unit
@@ -55,7 +55,7 @@ trait TestRPC {
5555
def generallyDoStuff[T](list: List[T])(implicit @encodingDependency tag: Tag[T]): Future[Option[T]]
5656
}
5757

58-
@silent("side-effecting nullary methods")
58+
@nowarn("msg=side-effecting nullary methods")
5959
object TestRPC extends RPCCompanion[TestRPC] {
6060

6161
// AsRaw.materialize[DummyRPC.RawRPC, TestRPC].showAst

commons-core/src/test/scala/com/avsystem/commons/serialization/SimpleGenCodecTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.avsystem.commons
22
package serialization
33

44
import com.avsystem.commons.misc.TypedMap
5-
import com.github.ghik.silencer.silent
5+
import scala.annotation.nowarn
66

77
import scala.collection.immutable.ListMap
88

@@ -20,7 +20,7 @@ trait SimpleIOCodecTest extends AbstractCodecTest {
2020

2121
class SimpleGenCodecRoundtripTest extends GenCodecRoundtripTest with SimpleIOCodecTest
2222

23-
@silent
23+
@nowarn
2424
class SimpleGenCodecTest extends SimpleIOCodecTest {
2525

2626
import CodecTestData._

commons-macros/src/main/scala/com/avsystem/commons/macros/rpc/RpcMappings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ private[commons] trait RpcMappings { this: RpcMacroCommons with RpcSymbols =>
333333
case Nil => (Nil, rawType)
334334
case head :: tail =>
335335
val (filteredTail, tailNewRawType) = filter(tail)
336-
val List(newRawType, oldRawType) = head.tpe.baseType(baseIcSym).typeArgs
336+
val List(newRawType, oldRawType) = head.tpe.baseType(baseIcSym).typeArgs: @unchecked
337337
if (oldRawType =:= tailNewRawType)
338338
(head :: filteredTail, newRawType)
339339
else

commons-redis/src/main/scala/com/avsystem/commons/redis/commands/scripting.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import com.avsystem.commons.redis._
99
import com.avsystem.commons.redis.commands.ReplyDecoders._
1010
import com.avsystem.commons.redis.exception.ErrorReplyException
1111
import com.avsystem.commons.redis.protocol.ValidRedisMsg
12-
import com.github.ghik.silencer.silent
12+
import scala.annotation.nowarn
1313
import com.google.common.hash.Hashing
1414

1515
trait KeyedScriptingApi extends ApiSubset {
@@ -124,7 +124,7 @@ case class Sha1(raw: String) extends AnyVal {
124124
override def toString: String = raw
125125
}
126126
object Sha1 {
127-
@silent
127+
@nowarn
128128
def hashString(input: CharSequence): Sha1 =
129129
Sha1(Hashing.sha1.hashString(input, StandardCharsets.UTF_8).toString)
130130

commons-redis/src/test/scala/com/avsystem/commons/redis/ApiTypecheckingTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.avsystem.commons
22
package redis
33

44
import com.avsystem.commons.redis.commands.Encoding
5-
import com.github.ghik.silencer.silent
5+
import scala.annotation.nowarn
66

77
object ApiTypecheckingTest {
88

0 commit comments

Comments
 (0)