Repository navigation
Conversation
- scalaVersion 3.3.8 -> 3.9.0; Scala Steward pin 3.3. -> 3.9.
- drop -Yfuture-lazy-vals: rejected by 3.9 ("bad option"), VarHandle-based
lazy vals are the default since 3.8
- KafkaStage: pass the SortedSet ordering with `using` (3.9 no longer
accepts an explicit argument list for the implicit parameter there)
- resource.scala: with 3.9, the NoEnclosingConcurrencyScope given is emitted
returning void, so the BoxedUnit version (linked by code compiled with
3.3) is now provided explicitly via @TargetNAME; keeps MiMa green
(scala/scala3#24653)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `_` type wildcards -> `?`, `xs: _*` -> `xs*`, `= _` -> `= uninitialized` - remove unused imports/params/pattern vars reported by the new unused checker (`@unused` where the parameter is part of the public API) - remove a written-but-never-read `successCalls` counter in CircuitBreakerStateMachine - `@unchecked` type tests for local classes in flattenPar / groupBy (TODO(scala-3.9)) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| case FromParent(t) => | ||
| // safe: these values never leave this invocation | ||
| case fp: FromParent @unchecked => |
There was a problem hiding this comment.
hm that's suspicious. Isn't the pool typed with a union type, which should make this work?
There was a problem hiding this comment.
New check:
[E092] Pattern Match Unchecked Warning: groupByImpl.scala:150:15
case FromParent(t) =>
the type test for FromParent cannot be checked at runtime because it's a local class
There was a problem hiding this comment.
hm so maybe it should be a private top-level class? or maybe the match can be expressed differently ... it is a proper type, so matching on it should be possible
|
|
||
| case Nested(t) => | ||
| // safe: these values never leave this invocation | ||
| case n: Nested @unchecked => |
There was a problem hiding this comment.
same here ... this shouldn't be unchecked
There was a problem hiding this comment.
As above:
[E092] Pattern Match Unchecked Warning: FlowOps.scala:660:15
case Nested(t) =>
the type test for Nested cannot be checked at runtime because it's a local class
| def empty[A]: Chunk[A] = Empty | ||
|
|
||
| def fromArray[A: ClassTag](array: Array[A]): Chunk[A] = | ||
| def fromArray[A](array: Array[A])(using @unused ct: ClassTag[A]): Chunk[A] = |
There was a problem hiding this comment.
what's the deault with an unused using? ;) it's needed for creating the array?
There was a problem hiding this comment.
[warn] -- [E198] Unused Symbol Warning: .../ox/core/src/main/scala/ox/Chunk.scala:188:42
[warn] 188 | def fromArray[A](array: Array[A])(using ct: ClassTag[A]): Chunk[A] =
[warn] | ^^
[warn] | unused implicit parameter
[warn] -- [E198] Unused Symbol Warning: .../ox/core/src/main/scala/ox/Chunk.scala:191:44
[warn] 191 | def fromIArray[A](array: IArray[A])(using ct: ClassTag[A]): Chunk[A] =
[warn] | ^^
[warn] | unused implicit parameter
[success] elapsed time: 9 s
This parameter was not needed, so after update to 3.9 it was reported as unused but deleting it triggered MiMa.
[error] core: Failed binary compatibility check against com.softwaremill.ox:core_3:1.0.9! Found 2 potential problems (filtered 38)
[error] * method fromArray(java.lang.Object,scala.reflect.ClassTag)ox.Chunk in object ox.Chunk does not have a correspondent in current version
[error] * method fromIArray(java.lang.Object,scala.reflect.ClassTag)ox.Chunk in object ox.Chunk does not have a correspondent in current version
[error] To accept the incompatible changes above, add the lines below to mimaBinaryIssueFilters, or to src/main/mima-filters/<version>.backwards.excludes.
[error] ProblemFilters.exclude[DirectMissingMethodProblem]("ox.Chunk.fromArray(java.lang.Object,scala.reflect.ClassTag)ox.Chunk"),
[error] ProblemFilters.exclude[DirectMissingMethodProblem]("ox.Chunk.fromIArray(java.lang.Object,scala.reflect.ClassTag)ox.Chunk"),
[error] (core / mimaReportBinaryIssues) Failed binary compatibility check against com.softwaremill.ox:core_3:1.0.9! Found 2 potential problems (filtered 38)
There was a problem hiding this comment.
Ah ok. Then adding a comment why it's there would be useful :)
| case given boundary.Label[Either[E, Nothing]] => | ||
| break(t.asInstanceOf[Either[E, Nothing]]) | ||
| case given boundary.Label[Either[Nothing, Nothing]] => | ||
| case _: boundary.Label[Either[Nothing, Nothing]] => |
There was a problem hiding this comment.
why the change here? the given works above, but not in the second clause?
There was a problem hiding this comment.
It was reported as unused after updating to 3.9.
[warn] -- [E198] Unused Symbol Warning: .../ox/core/src/main/scala/ox/either.scala:80:13
[warn] 80 | case given boundary.Label[Either[Nothing, Nothing]] =>
[warn] | ^^^^^^^^^^^^^^^^^^
[warn] | unused pattern variable
So the change didn't really change anything outside of warning.
Needs scala 3.9+ - probably needs new minor version