src/Pure/Tools/build_job.scala
changeset 72683 b5e6f0d137a7
parent 72675 cc1347c8c804
child 72692 22aeec526ffd
--- a/src/Pure/Tools/build_job.scala	Sat Nov 21 20:35:48 2020 +0100
+++ b/src/Pure/Tools/build_job.scala	Sat Nov 21 21:02:38 2020 +0100
@@ -227,12 +227,13 @@
                   progress.echo_document(msg)
               }
             val documents =
-              Presentation.build_documents(session_name, deps, store,
-                output_sources = info.document_output,
-                output_pdf = info.document_output,
-                progress = document_progress,
-                verbose = verbose,
-                verbose_latex = true)
+              using(store.open_database_context(deps.sessions_structure))(db_context =>
+                Presentation.build_documents(session_name, deps, db_context,
+                  output_sources = info.document_output,
+                  output_pdf = info.document_output,
+                  progress = document_progress,
+                  verbose = verbose,
+                  verbose_latex = true))
             using(store.open_database(session_name, output = true))(db =>
               for ((doc, pdf) <- documents) {
                 db.transaction {