src/Pure/Tools/build.scala
changeset 76206 769a7cd5a16a
parent 76202 d535db35388e
child 76209 365f6a621fc5
equal deleted inserted replaced
76205:005abcb34849 76206:769a7cd5a16a
   135 
   135 
   136 
   136 
   137   /** build with results **/
   137   /** build with results **/
   138 
   138 
   139   class Results private[Build](
   139   class Results private[Build](
       
   140     val store: Sessions.Store,
   140     results: Map[String, (Option[Process_Result], Sessions.Info)],
   141     results: Map[String, (Option[Process_Result], Sessions.Info)],
   141     val presentation_sessions: List[String]
   142     val presentation_sessions: List[String]
   142   ) {
   143   ) {
       
   144     def cache: Term.Cache = store.cache
       
   145 
   143     def sessions: Set[String] = results.keySet
   146     def sessions: Set[String] = results.keySet
   144     def cancelled(name: String): Boolean = results(name)._1.isEmpty
   147     def cancelled(name: String): Boolean = results(name)._1.isEmpty
   145     def info(name: String): Sessions.Info = results(name)._2
   148     def info(name: String): Sessions.Info = results(name)._2
   146     def apply(name: String): Process_Result = results(name)._1.getOrElse(Process_Result(1))
   149     def apply(name: String): Process_Result = results(name)._1.getOrElse(Process_Result(1))
   147     val rc: Int =
   150     val rc: Int =
   459           name <- build_sessions.build_topological_order.iterator
   462           name <- build_sessions.build_topological_order.iterator
   460           result <- build_results.get(name)
   463           result <- build_results.get(name)
   461           if result.ok && browser_info.enabled(result.info)
   464           if result.ok && browser_info.enabled(result.info)
   462         } yield name).toList
   465         } yield name).toList
   463 
   466 
   464       new Results(results, presentation_sessions)
   467       new Results(store, results, presentation_sessions)
   465     }
   468     }
   466 
   469 
   467     if (export_files) {
   470     if (export_files) {
   468       for (name <- full_sessions_selection.iterator if results(name).ok) {
   471       for (name <- full_sessions_selection.iterator if results(name).ok) {
   469         val info = results.info(name)
   472         val info = results.info(name)