tuned signature;
authorwenzelm
Tue, 22 Mar 2022 20:06:41 +0100
changeset 75306 e8c1d982b275
parent 75305 171ac44913ca
child 75307 dc1c53d14c38
tuned signature;
src/Tools/VSCode/src/build_vscode_extension.scala
--- a/src/Tools/VSCode/src/build_vscode_extension.scala	Tue Mar 22 19:33:38 2022 +0100
+++ b/src/Tools/VSCode/src/build_vscode_extension.scala	Tue Mar 22 20:06:41 2022 +0100
@@ -137,7 +137,11 @@
 
   /* extension */
 
-  lazy val extension_dir = Path.explode("$ISABELLE_VSCODE_HOME/extension")
+  def extension_dir: Path = Path.explode("$ISABELLE_VSCODE_HOME/extension")
+  def extension_manifest: Path = extension_dir + Path.explode("MANIFEST")
+  def manifest_entries(): List[Path] =
+    for (line <- split_lines(File.read(extension_manifest)) if line.nonEmpty)
+      yield Path.explode(line)
 
   def build_extension(options: Options,
     logic: String = default_logic,
@@ -150,11 +154,7 @@
 
     Isabelle_System.with_tmp_dir("build")(build_dir =>
     {
-      for {
-        line <- split_lines(File.read(extension_dir + Path.explode("MANIFEST")))
-        if line.nonEmpty
-      } {
-        val path = Path.explode(line)
+      for (path <- manifest_entries()) {
         Isabelle_System.copy_file(extension_dir + path,
           Isabelle_System.make_directory(build_dir + path.dir))
       }