Re: [MirageOS-devel] load/startup time error handling

2016-10-04 Thread Mindy
On 10/04/2016 06:57 AM, Hannes Mehnert wrote: On 04/10/2016 12:04, Anil Madhavapeddy wrote: So this leads me to wonder if we shouldn't just bite the bullet and port all these interfaces to use Rresult [1] combinators instead. It does provide excellent support for propagating errors, and combin

Re: [MirageOS-devel] load/startup time error handling

2016-10-04 Thread Hannes Mehnert
On 04/10/2016 12:04, Anil Madhavapeddy wrote: > So this leads me to wonder if we shouldn't just bite the bullet and port > all these interfaces to use Rresult [1] combinators instead. It does provide > excellent support for propagating errors, and combinators for mapping > over result types quite

Re: [MirageOS-devel] load/startup time error handling

2016-10-04 Thread David Scott
On Tue, Oct 4, 2016 at 12:04 PM, Anil Madhavapeddy wrote: > On 1 Oct 2016, at 21:49, Hannes Mehnert wrote: > > > > On 30/09/2016 17:13, Hannes Mehnert wrote: > >> If nobody disagrees (and comes up with non-contrived examples), I'm > >> happy to massage code into this direction within the next fe

Re: [MirageOS-devel] load/startup time error handling

2016-10-04 Thread Anil Madhavapeddy
On 1 Oct 2016, at 21:49, Hannes Mehnert wrote: > > On 30/09/2016 17:13, Hannes Mehnert wrote: >> If nobody disagrees (and comes up with non-contrived examples), I'm >> happy to massage code into this direction within the next few days. > > Thanks for the feedback, I prepared a bunch of PRs linke

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Hannes Mehnert
On 30/09/2016 17:13, Hannes Mehnert wrote: > If nobody disagrees (and comes up with non-contrived examples), I'm > happy to massage code into this direction within the next few days. Thanks for the feedback, I prepared a bunch of PRs linked from https://github.com/mirage/mirage/pull/602 . Lots of

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Mindy
On 09/30/2016 11:13 AM, Hannes Mehnert wrote: Hey, There has been lots of threads about error reporting (both on this list and in several issues). I want to focus in here only on _load time errors_ - which happen during startup (exactly when `connect` is called). Please leave run time error h

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Mindy
On 09/30/2016 11:37 AM, Drup wrote: I was hoping we could add a `pp_error` function everywhere, and have something like `Error x -> fail (Device.pp_errror x)` Apparently, that was more complicated than I expected. I was hoping for this too, but it turned out to be quite difficult to implemen

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Thomas Leonard
On 1 October 2016 at 15:28, Richard Mortier wrote: > On 30 September 2016 at 17:13, Hannes Mehnert wrote: >> Hey, >> >> There has been lots of threads about error reporting (both on this list >> and in several issues). I want to focus in here only on _load time >> errors_ - which happen during s

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Richard Mortier
On 1 October 2016 at 15:32, Hannes Mehnert wrote: > > That'd be my choice: statically know at compile time how many interfaces > the router has, also to be able to configure addresses and policies for > the interfaces. That makes sense I think. Certainly knowing statically at compile time max-N s

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Hannes Mehnert
On 01/10/2016 15:28, Richard Mortier wrote: > Only thing that comes to mind is to clarify: in cases where one writes > a unikernel that can use (eg) one of two devices, is there a way to > determine which of the devices is actually available at boot, without > triggering an error? > > (I'm thinkin

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Richard Mortier
On 30 September 2016 at 17:13, Hannes Mehnert wrote: > Hey, > > There has been lots of threads about error reporting (both on this list > and in several issues). I want to focus in here only on _load time > errors_ - which happen during startup (exactly when `connect` is > called). Please leave

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Anil Madhavapeddy
On 30 Sep 2016, at 17:13, Hannes Mehnert wrote: > > Hey, > > There has been lots of threads about error reporting (both on this list > and in several issues). I want to focus in here only on _load time > errors_ - which happen during startup (exactly when `connect` is > called). Please leave r

Re: [MirageOS-devel] load/startup time error handling

2016-10-01 Thread Thomas Leonard
On 30 September 2016 at 17:13, Hannes Mehnert wrote: > Hey, > > There has been lots of threads about error reporting (both on this list > and in several issues). I want to focus in here only on _load time > errors_ - which happen during startup (exactly when `connect` is > called). Please leave

Re: [MirageOS-devel] load/startup time error handling

2016-09-30 Thread Drup
I was hoping we could add a `pp_error` function everywhere, and have something like `Error x -> fail (Device.pp_errror x)` Apparently, that was more complicated than I expected. In the end, I think you are right. Furthermore, Lwt has a built in error type (via Lwt.fail), so if someone want to d

[MirageOS-devel] load/startup time error handling

2016-09-30 Thread Hannes Mehnert
Hey, There has been lots of threads about error reporting (both on this list and in several issues). I want to focus in here only on _load time errors_ - which happen during startup (exactly when `connect` is called). Please leave run time error handling out of this thread. So far, connect retu