ocaml
0
fork

Configure Feed

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

Add a useful internal error when publication fails due to missing tree

This is not yet fixed, but is meant to fail early.

References: https://todo.sr.ht/~jonsterling/forester/136

+6 -1
+6 -1
lib/compiler/Phases.ml
··· 314 314 match vertex with 315 315 | Content_vertex _ -> None 316 316 | Iri_vertex iri -> 317 - Forest.find_opt forest.resources iri 317 + Option.some @@ 318 + match Forest.find_opt forest.resources iri with 319 + | None -> 320 + Reporter.fatalf Internal_error "Attempted to export publication but tree `%a` has not yet been planted" Iri.pp iri 321 + | Some result -> result 318 322 in 319 323 match publication.format with 320 324 | Json_blob -> ··· 365 369 Forest.plant_resource (T.Article article) forest.graphs forest.resources 366 370 | Job.Publish publication -> 367 371 export_publication ~env ~forest publication 372 + (* TODO: This MUST be deferred until after all the trees have been evaluated. *) 368 373 end 369 374 370 375 let eval : transition = fun forest ->