Skip to content

Commit d30a95e

Browse files
committed
Ignore StaleSymbol errors in IDE
Seems to happen in several scenarios. For now, ignore, so that we can get real work done in the IDE. Ignoring is configurable, we can turn it off if we want to hunt down problems.
1 parent 87f5347 commit d30a95e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

compiler/src/dotty/tools/dotc/core/Mode.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,7 @@ object Mode {
9090
* In this case, identifiers should never be imported.
9191
*/
9292
val InPackageClauseName = newMode(18, "InPackageClauseName")
93+
94+
/** We are in the IDE */
95+
val Interactive = newMode(20, "Interactive")
9396
}

compiler/src/dotty/tools/dotc/interactive/InteractiveCompiler.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package interactive
55
import core._
66
import Phases._
77
import typer._
8+
import Contexts._
89

910
class InteractiveCompiler extends Compiler {
1011
// TODO: Figure out what phases should be run in IDEs
@@ -14,4 +15,7 @@ class InteractiveCompiler extends Compiler {
1415
override def phases: List[List[Phase]] = List(
1516
List(new FrontEnd)
1617
)
18+
19+
override def rootContext(implicit ctx: Context) =
20+
super.rootContext.fresh.addMode(Mode.Interactive)
1721
}

0 commit comments

Comments
 (0)