Skip to content

Commit 4c24627

Browse files
authored
Merge pull request #445 from AVSystem/scala-update
Scala update
2 parents 5043023 + 9f440b4 commit 4c24627

File tree

8 files changed

+25
-21
lines changed

8 files changed

+25
-21
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.13.10, 2.12.17]
27+
scala: [2.13.11, 2.12.18]
2828
java: [temurin@11, temurin@17]
2929
runs-on: ${{ matrix.os }}
3030
steps:
@@ -101,7 +101,7 @@ jobs:
101101
strategy:
102102
matrix:
103103
os: [ubuntu-latest]
104-
scala: [2.13.10]
104+
scala: [2.13.11]
105105
java: [temurin@11]
106106
runs-on: ${{ matrix.os }}
107107
steps:
@@ -136,22 +136,22 @@ jobs:
136136
~/Library/Caches/Coursier/v1
137137
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
138138

139-
- name: Download target directories (2.13.10)
139+
- name: Download target directories (2.13.11)
140140
uses: actions/download-artifact@v2
141141
with:
142-
name: target-${{ matrix.os }}-2.13.10-${{ matrix.java }}
142+
name: target-${{ matrix.os }}-2.13.11-${{ matrix.java }}
143143

144-
- name: Inflate target directories (2.13.10)
144+
- name: Inflate target directories (2.13.11)
145145
run: |
146146
tar xf targets.tar
147147
rm targets.tar
148148
149-
- name: Download target directories (2.12.17)
149+
- name: Download target directories (2.12.18)
150150
uses: actions/download-artifact@v2
151151
with:
152-
name: target-${{ matrix.os }}-2.12.17-${{ matrix.java }}
152+
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}
153153

154-
- name: Inflate target directories (2.12.17)
154+
- name: Inflate target directories (2.12.18)
155155
run: |
156156
tar xf targets.tar
157157
rm targets.tar
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.avsystem.commons
22
package derivation
33

4-
trait DeferredInstance[T] {this: T =>
4+
trait DeferredInstance[T] { this: T =>
55
var underlying: T = _
66
}

core/src/test/scala/com/avsystem/commons/misc/SharedExtensionsTest.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,12 @@ class SharedExtensionsTest extends AnyFunSuite with Matchers {
154154
}
155155

156156
test("sourceCode") {
157-
assert(123.sourceCode == "123")
157+
// for some magical reason does not work on 'Int' type in Scala 2.13.11:
158+
// java.lang.NullPointerException: Cannot invoke "scala.reflect.internal.Symbols$Symbol.owner()" because the return value of "scala.reflect.internal.Trees$Tree.symbol()" is null
159+
// scala.tools.nsc.typechecker.Typers$Typer.checkDubiousAdaptation$1(Typers.scala:5330)
160+
// assert(123.sourceCode == "123")
161+
162+
assert(123.123.sourceCode == "123.123")
158163

159164
val src = {
160165
println(123)
@@ -169,7 +174,7 @@ class SharedExtensionsTest extends AnyFunSuite with Matchers {
169174
}
170175

171176
test("withSourceCode") {
172-
assert(123.withSourceCode == (123, "123"))
177+
assert(123.123.withSourceCode == (123.123, "123.123"))
173178
}
174179

175180
test("flatCollect") {

core/src/test/scala/com/avsystem/commons/serialization/BuildablePojo.scala

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

4-
import java.util.Objects
5-
64
// this should be written in Java but it was rewritten to Scala in order to make Scala.js linker happy
75
object BuildablePojo {
86
def builder(): Builder = new Builder

hocon/src/test/scala/com/avsystem/commons/hocon/HParserTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package com.avsystem.commons.hocon
1+
package com.avsystem.commons
2+
package hocon
23

34
import com.avsystem.commons.testutil.FileBasedSuite
45

mongo/jvm/src/main/scala/com/avsystem/commons/mongo/Filter.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ object Filter {
5454
trait CanCompare[BSON <: BsonValue]
5555
object CanCompare {
5656
def create[BSON <: BsonValue]: CanCompare[BSON] = new CanCompare[BSON] {}
57-
implicit val date = create[BsonDateTime]
58-
implicit val int32 = create[BsonInt32]
59-
implicit val int64 = create[BsonInt64]
60-
implicit val double = create[BsonDouble]
57+
implicit val date: CanCompare[BsonDateTime] = create[BsonDateTime]
58+
implicit val int32: CanCompare[BsonInt32] = create[BsonInt32]
59+
implicit val int64: CanCompare[BsonInt64] = create[BsonInt64]
60+
implicit val double: CanCompare[BsonDouble] = create[BsonDouble]
6161
}
6262
}
63-
}
63+
}

project/Commons.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ object Commons extends ProjectGroup("commons") {
7171
Developer("ghik", "Roman Janusz", "[email protected]", url("https://github.com/ghik")),
7272
),
7373

74-
crossScalaVersions := Seq("2.13.10", "2.12.17"),
74+
crossScalaVersions := Seq("2.13.11", "2.12.18"),
7575
scalaVersion := crossScalaVersions.value.head,
7676
compileOrder := CompileOrder.Mixed,
7777

redis/src/test/scala/com/avsystem/commons/redis/examples/ScriptingExample.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.avsystem.commons.redis.protocol.{BulkStringMsg, NullBulkStringMsg}
1111
* Example which shows how to execute LUA scripts.
1212
*/
1313
object ScriptingExample extends App {
14-
implicit val actorSystem = ActorSystem()
14+
implicit val actorSystem: ActorSystem = ActorSystem()
1515

1616
val client = new RedisNodeClient
1717
val api = RedisApi.Node.Async.StringTyped(client)

0 commit comments

Comments
 (0)