Skip to content

0.13.11 regression: incremental compiler misses when macro expansion references another source #2560

@eed3si9n

Description

@eed3si9n

steps

  1. Macro expansion in A.scala references another source B.scala.
  2. Change B.scala.

problem

A.scala doesn't get compiled.

expectation

A.scala gets compiled.

notes

This can be confirmed when "member reference internal dependencies" doesn't contain the entry from A.scala to B.scala.

This was caused by 0f61629:

   override def traverse(tree: Tree): Unit = tree match {
     ....
      case MacroExpansionOf(original) if inspectedOriginalTrees.add(original) => traverse(original)
      case other => super.traverse(other)
    }

This won't traverse into an Apply tree, for instance if it has MacroExpansionAttachment. The fix is to call super.traverse(tree) for MacroExpansionOf case as well.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions