more robust (see also 7f55a3e28c88): resolve components from current Isabelle context, using Isabelle/Scala instead of shell scripts;
authorwenzelm
Tue, 24 Jan 2023 14:46:51 +0100
changeset 77069 348f4d95d110
parent 77068 ef1831744f00
child 77070 2310755b38ad
more robust (see also 7f55a3e28c88): resolve components from current Isabelle context, using Isabelle/Scala instead of shell scripts;
src/Pure/Admin/other_isabelle.scala
--- a/src/Pure/Admin/other_isabelle.scala	Tue Jan 24 11:36:15 2023 +0100
+++ b/src/Pure/Admin/other_isabelle.scala	Tue Jan 24 14:46:51 2023 +0100
@@ -47,12 +47,6 @@
       env = null, cwd = isabelle_home.file, redirect = redirect, echo = echo, strict = strict)
   }
 
-  def resolve_components(echo: Boolean): Unit = {
-    other_isabelle.bash(
-      "bin/isabelle env ISABELLE_TOOLS=" + Bash.string(Isabelle_System.getenv("ISABELLE_TOOLS")) +
-      " isabelle components -a", redirect = true, echo = echo).check
-  }
-
   def getenv(name: String): String =
     other_isabelle.bash("bin/isabelle getenv -b " + Bash.string(name)).check.out
 
@@ -62,6 +56,13 @@
   val etc_settings: Path = etc + Path.explode("settings")
   val etc_preferences: Path = etc + Path.explode("preferences")
 
+  def resolve_components(echo: Boolean): Unit = {
+    val missing = Path.split(getenv("ISABELLE_COMPONENTS_MISSING"))
+    for (path <- missing) {
+      Components.resolve(path.dir, path.file_name, progress = if (echo) progress else new Progress)
+    }
+  }
+
 
   /* components */