src/Pure/Tools/build_job.scala
changeset 72854 6c660f05f70c
parent 72853 d0038b553e0e
child 72856 3a27e6f83ce1
equal deleted inserted replaced
72853:d0038b553e0e 72854:6c660f05f70c
    10 import scala.collection.mutable
    10 import scala.collection.mutable
    11 
    11 
    12 
    12 
    13 object Build_Job
    13 object Build_Job
    14 {
    14 {
       
    15   /* theory markup/messages from database */
       
    16 
    15   def read_theory(
    17   def read_theory(
    16     db_context: Sessions.Database_Context, session: String, theory: String): Option[Command] =
    18     db_context: Sessions.Database_Context, session: String, theory: String): Option[Command] =
    17   {
    19   {
    18     def read(name: String): Export.Entry =
    20     def read(name: String): Export.Entry =
    19       db_context.get_export(session, theory, name)
    21       db_context.get_export(List(session), theory, name)
    20 
    22 
    21     def read_xml(name: String): XML.Body =
    23     def read_xml(name: String): XML.Body =
    22       db_context.xml_cache.body(
    24       db_context.xml_cache.body(
    23         YXML.parse_body(Symbol.decode(UTF8.decode_permissive(read(name).uncompressed))))
    25         YXML.parse_body(Symbol.decode(UTF8.decode_permissive(read(name).uncompressed))))
    24 
    26 
   320 
   322 
   321       val (document_output, document_errors) =
   323       val (document_output, document_errors) =
   322         try {
   324         try {
   323           if (build_errors.isInstanceOf[Exn.Res[_]] && process_result.ok && info.documents.nonEmpty)
   325           if (build_errors.isInstanceOf[Exn.Res[_]] && process_result.ok && info.documents.nonEmpty)
   324           {
   326           {
   325             using(store.open_database_context(deps.sessions_structure))(db_context =>
   327             using(store.open_database_context())(db_context =>
   326               {
   328               {
   327                 val documents =
   329                 val documents =
   328                   Presentation.build_documents(session_name, deps, db_context,
   330                   Presentation.build_documents(session_name, deps, db_context,
   329                     output_sources = info.document_output,
   331                     output_sources = info.document_output,
   330                     output_pdf = info.document_output,
   332                     output_pdf = info.document_output,