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

Nested class shadowing in "override" position #244

Closed
eed3si9n opened this issue Mar 6, 2020 · 2 comments
Closed

Nested class shadowing in "override" position #244

eed3si9n opened this issue Mar 6, 2020 · 2 comments

Comments

@eed3si9n
Copy link

eed3si9n commented Mar 6, 2020

Aloha. This is a friendly note from Lightbend Scala Team that Community Builds has discovered a potential issue you might run into when migrating to Dotty / Scala 3.x.

Ref scala/scala#8705 / scala/bug#8353

steps

Compile using the latest 2.13.x nightly (https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/3267/)

diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index dd9426e..15e8611 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -45,7 +45,7 @@ object Dependencies {
     val betterMonadicFor = compilerPlugin("com.olegpy"     %% "better-monadic-for" % Versions.betterMonadicFor)
     val contextApplied   = compilerPlugin("org.augustjune" %% "context-applied"    % Versions.contextApplied)
     val kindProjector = compilerPlugin(
-      "org.typelevel" % "kind-projector" % Versions.kindProjector cross CrossVersion.full
+      "org.typelevel" % "kind-projector_2.13.1" % "0.11.0"
     )
   }
[sbt] redis4cats λ set ThisBuild/resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
[sbt] redis4cats λ ++2.13.2-bin-53ba87a!
[sbt] redis4cats λ compile

or use 2.13.2 when it comes out.

problem

Community Builds discovered there are some nested classes in "override" position.

[error] shadowing a nested class of a parent is deprecated but class E$F shadows class E$F defined in class BaseRedis; rename the class to something else
[error] shadowing a nested class of a parent is deprecated but class E$F shadows class E$F defined in class BaseRedis; rename the class to something else
[error] two errors found
[error] (redis4cats-effects / Compile / compileIncremental) Compilation failed

expectation

Nothing for now, but consider renaming them when you can.

notes

You could silence the warning using @nowarn when scala/scala#8373 lands.

@gvolpe
Copy link
Member

gvolpe commented Mar 6, 2020

Wow, this is awesome! Thanks for the report, @eed3si9n :)

@gvolpe
Copy link
Member

gvolpe commented Jun 1, 2020

It seems this issue has been fixed in augustjune/context-applied#5 . If it appears again, please report back :)

@gvolpe gvolpe closed this as completed Jun 1, 2020
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

No branches or pull requests

2 participants