-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:incremental-compilationarea:metaprogramming:reflectionIssues related to the quotes reflection APIIssues related to the quotes reflection APIitype:bugstat:needs minimizationNeeds a self contained minimizationNeeds a self contained minimization
Milestone
Description
Compiler version
3.2.0 (also tested in 3.3.0-RC2)
Minimized code
https://github.com/hejfelix/macro-repro
this repository reproduces the bug. Basically, it seems to be caching the macro output and then failing on incremental compilations. The position and the sourcefile are now undefined (macro doesn't fail, though). The result is then an empty string.
Output
[info] compiling 1 Scala source to /Users/dkFePaHa/repos/macro-repro/target/scala-3.2.0/classes ...
[info] compiling 1 Scala source to /Users/dkFePaHa/repos/macro-repro/target/scala-3.2.0/classes ...
[info] -- Info: /Users/dkFePaHa/repos/macro-repro/src/main/scala/Main.scala:2:69 ------
[info] 2 | def main(args: Array[String]):Unit = println(SourceMacro.getContent[Foo[?]])
[info] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[info] | TypeRepr.of[A].typeSymbol.pos: ?, sourceFile: <no file>
[info] running Main
Expectation
The behavior on first and subsequent compilations
Metadata
Metadata
Assignees
Labels
area:incremental-compilationarea:metaprogramming:reflectionIssues related to the quotes reflection APIIssues related to the quotes reflection APIitype:bugstat:needs minimizationNeeds a self contained minimizationNeeds a self contained minimization