more thorough consolidation: follow dependencies of forked proofs (e.g. see theories MaxPrefix vs. MaxChop in AFP/Functional-Automata);
authorwenzelm
Sun, 05 Feb 2023 20:05:14 +0100
changeset 77198 9b35c1171d9a
parent 77197 a541da01ba67
child 77199 7d7786585ab0
more thorough consolidation: follow dependencies of forked proofs (e.g. see theories MaxPrefix vs. MaxChop in AFP/Functional-Automata);
src/Pure/PIDE/session.scala
--- a/src/Pure/PIDE/session.scala	Sun Feb 05 15:59:18 2023 +0100
+++ b/src/Pure/PIDE/session.scala	Sun Feb 05 20:05:14 2023 +0100
@@ -618,10 +618,11 @@
                 case None => consolidation.update()
                 case Some(version) =>
                   val consolidate =
-                    consolidation.flush().iterator.filter(name =>
+                    version.nodes.descendants(consolidation.flush().toList).filter { name =>
                       !resources.session_base.loaded_theory(name) &&
                       !state.node_consolidated(version, name) &&
-                      state.node_maybe_consolidated(version, name)).toList
+                      state.node_maybe_consolidated(version, name)
+                    }
                   if (consolidate.nonEmpty) handle_raw_edits(consolidate = consolidate)
               }
             }