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

[3.0.x] Scala 2.13.14 / Add explicit types and remove -Xmigration flag #12576

Merged
merged 4 commits into from
May 2, 2024

Conversation

@mkurz
Copy link
Member Author

mkurz commented Apr 30, 2024

@SethTisue Solely changing the Scala version from 2.13.13 to 2.13.14 results in following errors, see https://github.com/playframework/playframework/actions/runs/8895002546/job/24424731331?pr=12576#step:11:384:

[error] /home/runner/work/playframework/playframework/core/play-streams/src/main/scala/play/api/libs/streams/ActorFlow.scala:59:24: in Scala 3 (or with -Xsource-features:infer-override), the inferred type changes to org.apache.pekko.actor.SupervisorStrategy instead of org.apache.pekko.actor.OneForOneStrategy [quickfixable]
[error] Scala 3 migration messages are issued as errors under -Xsource:3. Use -Wconf or @nowarn to demote them to warnings or suppress.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=play.api.libs.streams.ActorFlow.actorRef
[error]           override def supervisorStrategy = OneForOneStrategy() {
[error]                        ^
[info] done compiling
[error] (ProjectRef(uri("file:///home/runner/work/playframework/playframework/"), "Play-Streams") / Compile / compileIncremental) Compilation failed

....

[error] /home/runner/work/playframework/playframework/core/play-configuration/src/main/scala/play/api/Configuration.scala:161:15: in Scala 3 (or with -Xsource-features:infer-override), the inferred type changes to Integer instead of Null [quickfixable]
[error] Scala 3 migration messages are issued as errors under -Xsource:3. Use -Wconf or @nowarn to demote them to warnings or suppress.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=play.api.Configuration.configError.$anonfun
[error]           def position          = null
[error]               ^
[error] one error found
[error] one error found
[error] (ProjectRef(uri("file:///home/runner/work/playframework/playframework/"), "Play-Configuration") / Compile / compileIncremental) Compilation failed

Is this expected?

@lrytz
Copy link
Contributor

lrytz commented Apr 30, 2024

Ah, you're using -Xsource:3 -Xmigration on the 3.0.x branch (https://github.com/playframework/playframework/blob/3.0.x/project/PlayBuildBase.scala#L59). That was a sort of a secret shorthand for -Xsource:3 -Wconf:cat=scala3-migration:w in 2.13.13 only, which we removed...

@mkurz mkurz changed the title [3.0.x] Scala 2.13.14 [3.0.x] Scala 2.13.14 / Add explicit types / Remove -Xmigration flag May 2, 2024
@mkurz mkurz changed the title [3.0.x] Scala 2.13.14 / Add explicit types / Remove -Xmigration flag [3.0.x] Scala 2.13.14 / Add explicit types and emove -Xmigration flag May 2, 2024
@mkurz mkurz changed the title [3.0.x] Scala 2.13.14 / Add explicit types and emove -Xmigration flag [3.0.x] Scala 2.13.14 / Add explicit types and remove -Xmigration flag May 2, 2024
@mkurz mkurz marked this pull request as ready for review May 2, 2024 11:37
@mkurz mkurz merged commit d988648 into playframework:3.0.x May 2, 2024
25 checks passed
@mkurz mkurz deleted the scala-2.13.14_3.0.x branch May 2, 2024 11:42
@mkurz mkurz added this to the 3.0.3 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants