2 ms·
The compiler is set up so that this should be impossible! At the start of an "update", we mark parts of the dependency graph as "outdated" and "potentially outd
by mlugg 2y ago
The compiler is set up so that this should be impossible! At the start of an "update", we mark parts of the dependency graph as "outdated" and "potentially outdated", based on which source code changed. From there, we repeatedly use a heuristic to find the "best" thing to analyze; each thing we analyze is guaranteed to remove at least one outdated (/potentially outdated) thing, and compilation terminates once nothing is marked outdated.
The way we do this does unfortunately mean that if our heuristic goes very wrong, we can end up doing much more work than is necessary. There are some real nasty cases with self-referential types right now. However, for simple things like changing function bodies, it works lovely!
- layer8 2y agoI would have expected (assuming the compiler executable is included as a tracked dependency at all) that it stops once the output doesn’t change anymore.