ocaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Run jobs after evaluating single tree

+12 -7
+2 -2
lib/compiler/Driver.ml
··· 85 85 in 86 86 (report ~errors ~and_then:(Run_jobs jobs), forest) 87 87 | Eval uri -> begin 88 - Phases.eval_only uri forest; 89 - (Done, forest) 88 + let jobs = Phases.eval_only uri forest in 89 + (Run_jobs jobs, forest) 90 90 end 91 91 | Plant_assets -> 92 92 (* TODO: We really only need to plant the assets that are referred to (look
+10 -5
lib/compiler/Phases.ml
··· 127 127 | Some (Tree ({phase; _} as t)) -> begin 128 128 match phase with 129 129 | Loaded | Parsed | Evaluated -> assert false 130 - | Expanded -> 130 + | Expanded -> begin 131 131 let source_path = 132 132 if forest.dev then URI.Tbl.find_opt forest.resolver uri else None 133 133 in 134 - (* TODO: run jobs. *) 135 134 let result, errors = 136 135 Eval.eval_tree ~config:forest.config ~source_path ~uri t 137 136 in 138 137 forest.?{uri} <- errors; 139 - let@ {articles; _} = Option.iter @~ result in 140 - let@ article = List.iter @~ articles in 141 - State.plant_resource ~forest (Article article) 138 + match result with 139 + | None -> [] 140 + | Some {articles; jobs} -> 141 + let () = 142 + let@ article = List.iter @~ articles in 143 + State.plant_resource ~forest (Article article) 144 + in 145 + jobs 146 + end 142 147 end 143 148 144 149 let implant ~(forest : State.t) (foreign : Config.foreign) =