mirage / functoria

A DSL to invoke otherworldly functors
ISC License
63 stars 21 forks source link

regression in functoria 3.0 #182

Closed hannesm closed 4 years ago

hannesm commented 4 years ago

from ocaml-tls in mirage/examples:

] mirage configure
File "config.ml", lines 7-9, characters 4-25:
7 | ....match Sys.getenv "BUILD" with
8 |     | "client" -> `Client
9 |     | "server" -> `Server
Error (warning 8): this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
""
run ['dune' 'exec' '--root'
     '/usr/home/hannes/devel/mirage/ocaml-tls/mirage/example' '--'
     './config.exe' 'configure']: exited with 1

--> mirage configure used to work, now it fails due to an incomplete pattern match. I'm not sure whether this should be expected.

hannesm commented 4 years ago

I'm fine with warnings are errors (and we can close this if everyone agrees)

samoht commented 4 years ago

The warning as errors are enabled in dune's dev mode only. Currently there is no way to use the release mode but we should probably add something -- for production unikernel vs. dev setups.

hannesm commented 4 years ago

this would be great to have fixed and released (with a mirage3-compatible functoria) rather sooner than later, because only then we are able to deprecate bindings for config.ml (and remove them with 4.0). thanks!

It'd be good to re-use the existing warn-error flag which can be passed to mirage (defaults to off).

hannesm commented 4 years ago

thanks for fixing this in #193 / functoria 3.1.0 @samoht