The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

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

Preserve backtraces in fork_daemon and fork_promise_exn

If the fiber fails, record the backtrace when failing the switch. `fork`
itself already did this, but `fork_daemon` and `fork_promise_exn`
didn't.

+4 -2
+4 -2
lib_eio/core/fiber.ml
··· 39 39 (* The daemon was cancelled because all non-daemon fibers are finished. *) 40 40 () 41 41 | exception ex -> 42 - Switch.fail sw ex; (* The [with_daemon] ensures this will succeed *) 42 + let bt = Printexc.get_raw_backtrace () in 43 + Switch.fail ~bt sw ex; (* The [with_daemon] ensures this will succeed *) 43 44 ) (* else the fiber should report the error to [sw], but [sw] is failed anyway *) 44 45 45 46 let fork_promise ~sw f = ··· 65 66 match Switch.with_op sw f with 66 67 | x -> Promise.resolve r x 67 68 | exception ex -> 68 - Switch.fail sw ex (* The [with_op] ensures this will succeed *) 69 + let bt = Printexc.get_raw_backtrace () in 70 + Switch.fail ~bt sw ex (* The [with_op] ensures this will succeed *) 69 71 ); 70 72 p 71 73