Skip to content

PR #16373 introduces a "cannot resolve reference to type" compilation error on ReactiveMongo #18555

Closed
@SamTheisens

Description

@SamTheisens

Compiler version

The issue was introduced in Scala version 3.3.0-RC1-bin-20221214-6383025-NIGHTLY in resolving #16373
The is still present in scala 3.3.1.

Minimized code

Unfortunately I have not been able to construct a minimal example. This pull request on the ReactiveMongo library reproduces the problem ReactiveMongo/ReactiveMongo#1251 on compilation.

Output (click arrow to expand)

[info] compiling 134 Scala sources and 1 Java source to /Users/samtheisens/IdeaProjects/ReactiveMongo/driver/target/shaded/scala-3.3.1/classes ...

  unhandled exception while running MegaPhase{crossVersionChecks, firstTransform, checkReentrant, elimPackagePrefixes, cookComments, checkStatic, checkLoopingImplicits, betaReduce, inlineVals, expandSAMs, elimRepeated, refchecks} on /Users/samtheisens/IdeaProjects/ReactiveMongo/driver/src/main/scala/api/collections/GenericCollectionWithCommands.scala

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/lampepfl/dotty/issues/new/choose

     while compiling: <no file>
        during phase: <no phase>
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.10
    compiler version: version 3.3.1
            settings: -Wconf List(cat=deprecation&msg=.*(MongoWireVersion|reflectiveSelectableFromLangReflectiveCalls|right-biased|scheduleAtFixedRate|filterInPlace|AtlasSearch|Experimental).*:s) -Werror true -Wunused List(nowarn) -Xsemanticdb true -bootclasspath /Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.3.1/scala3-library_3-3.3.1.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.10/scala-library-2.13.10.jar -classpath /Users/samtheisens/IdeaProjects/ReactiveMongo/driver/target/shaded/scala-3.3.1/classes:/Users/samtheisens/IdeaProjects/ReactiveMongo/core/target/shaded/scala-3.3.1/classes:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-actor_3/2.6.18/akka-actor_3-2.6.18.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/dnsjava/dnsjava/3.5.2/dnsjava-3.5.2.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/reactivemongo/reactivemongo-bson-api_3/1.1.0-RC11/reactivemongo-bson-api_3-1.1.0-RC11.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/reactivemongo/reactivemongo-shaded/1.1.0-RC11/reactivemongo-shaded-1.1.0-RC11.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/luben/zstd-jni/1.5.5-4/zstd-jni-1.5.5-4.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.10.1/snappy-java-1.1.10.1.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/typesafe/config/1.4.0/config-1.4.0.jar:/Users/samtheisens/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-java8-compat_2.13/1.0.0/scala-java8-compat_2.13-1.0.0.jar -d /Users/samtheisens/IdeaProjects/ReactiveMongo/driver/target/shaded/scala-3.3.1/classes -deprecation true -feature true -language List(higherKinds, implicitConversions) -semanticdb-target /Users/samtheisens/IdeaProjects/ReactiveMongo/driver/target/shaded/scala-3.3.1/meta

                tree: EmptyTree
       tree position: :<unknown>
           tree type: <notype>
              symbol: val <none>
           call site: package <root> in module class <root>

  == Source file context for tree position ==

[error] cannot resolve reference to type reactivemongo.api.collections.GenericCollectionWithCommands[P]#pack.type.Writer
[error] the classfile defining the type might be missing from the classpath

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions