scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.72k stars 1.04k forks source link

cannot be unpickled because no class file was found for denot: val <none> #20911

Open Quafadas opened 1 week ago

Quafadas commented 1 week ago

Compiler version

3.5.0-RC2

Minimized code

save this, in ext.ret.scala

//> using scala 3.5.0-RC2

package vecxt

export Retentions.*

object Retentions:
    opaque type Retention = Double
    extension (x: Retention)
        inline def retention: Double = x
end Retentions

Now this command scala-cli doc ext.ret.scala -o scaladoc -f

gives me this;

Output

Although it doesn't crash, it also doesn't provide any scala doc. I think it should, as it compiles?

Compiling project (Scala 3.5.0-RC2, JVM (21))
Compiled project (Scala 3.5.0-RC2, JVM (21))
class vecxt.ext.ret$package cannot be unpickled because no class file was found for denot: val <none>
1 error found
Wrote Scaladoc to ./scaladoc

Expectation

Generates scaladoc.

Workaround

Change the name of the file, to be ret.scala instead of ext.ret.scala. If the file is ret.scala then scaladoc seems successfully generated.

I believe however, that the second filename, should also be valid?

Prior art / duplicate of? https://github.com/scala/scala3/issues/16036

Which is closed - although I get this with scala 3.5.0-RC2. I'm unclear if it's the same or a different issue.

Gedochao commented 5 days ago

not specific to 3.5.0-RC2, can be replicated with earlier versions. curious, indeed.