You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importTestUtils._//If we copy the code to this file the bug does not happen!classTestextendsA {
TestUtils.anInlineMethod
}
abstractclassAextendsB { self =>}
traitB { self: A=> }
@main defhello() =
println("Hello, world")
newTest
}
The bug apened when:
1- compile Note all the code in the same module
2- Move the extensionMethod from File1 to File2
3- Run run
sbt:fmgp-geometry> run
[info] compiling 4Scala sources to /home/fabio/workspace/fmgp-threejs/target/scala-3.0.2-RC1-bin-20210713-cf6fa97-NIGHTLY/classes ...
[error] -- [E008] NotFoundError:/home/fabio/workspace/fmgp-threejs/src/main/scala/TestUtils.scala:4:38
[error] 4|inlinedefanInlineMethod:Unit=1.extensionMethod
[error] |^^^^^^^^^^^^^^^^^
[error] | value extensionMethod is not a member of Int
[error] one error found
[error] one error found
[error] (Compile/ compileIncremental) Compilation failed
[error] Totaltime: 0 s, completed Jul16, 202110:32:52AM
Expectation
The runtime error should not happen
The text was updated successfully, but these errors were encountered:
dwijnand
changed the title
Incremental Compilation inconsistent 2
Under zinc invalidation/recompilation when moving extension method to another file
Jul 16, 2021
I minimize the code a bit more.
It no longer depends on Munit
The Main.scala file looks like
import TestUtils._ //If we copy the code to this file the bug does not happen!
class Test extends A {
TestUtils.anInlineMethod
}
abstract class A extends B { self =>}
trait B { self: A => }
@main def hello() =
println("Hello, world")
new Test
I updated the documentation above
There is also the issue #13028 about incremental-compilation that I open. From what I could see is similar to this but I wasn't able to minimize the code.
The error as being changing:
1'- first was java.lang.NoClassDefFoundError
2'- later was java.lang.NoSuchMethodError: app.fmgp.File1$package$.extensionMethod(I)Ljava/lang/String;
3'- now is Not Found Error
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
ScalaVersion: 3.0.0 but also on 3.0.2-RC1-bin-20210713-cf6fa97-NIGHTLY
dependency (still): "org.scalameta" %% "munit" % "0.7.27"
Minimized code
File1.scala
File2.scala
TestUtils.scala
Main.scala
I also create a branch with the minimal amount of code: https://github.com/FabioPinheiro/fmgp-generative-design/tree/dotty_IncrementalCompilation_inconsistent_bug2/src/main/scala
Output
The bug apened when:
1-
compile
Note all the code in the same module2- Move the extensionMethod from File1 to File2
3- Run
run
Expectation
The runtime error should not happen
The text was updated successfully, but these errors were encountered: