mirage / functoria

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

Convert from jbuilder to dune #158

Closed emillon closed 5 years ago

emillon commented 5 years ago

This uses dune-the-binary, dune-the-file-format as well as some idioms ((test) stanza, :standard). I'm not sure if it's worth passing -safe-string by hand these days - if that's not the case we can just remove (flags) completely.

hannesm commented 5 years ago

@emillon I'm fine with using dune defaults, and not pass -safe-string manually in the mirage ecosystem

emillon commented 5 years ago

@hannesm thanks, I removed (flags) to get the default ones.

Drup commented 5 years ago

Can you remind me of which warning/errors are going to be enable/disable because of this? The warnings were carefully chosen.

emillon commented 5 years ago

The warnings numbers correspond to the following:

 40 Constructor or label name used out of scope.
 42 Disambiguated constructor or label name (compatibility warning).
 44 Open statement shadows an already defined identifier.
 48 Implicit elimination of optional arguments.
 15 Private method made public implicitly.

I'm not sure why -warn-error -15 is used since by default it is not a fatal warning.

Drup commented 5 years ago

No, I meant, what is the difference between our warnings, and the one enable/disabled by dune by default.

emillon commented 5 years ago

It seems that dune suppresses the additional following warnings:

4 Fragile pattern matching: matching that will remain complete even
if additional constructors are added to one of the variant types
matched.
29 Unescaped end-of-line in a string constant (non-portable code).
41 Ambiguous constructor or label name.
45 Open statement shadows an already defined label or constructor.
58 Missing cmx file
60 Unused module declaration
Drup commented 5 years ago

Right, the additional ones are fairly debatable, so I'm okay with using the defaults.

emillon commented 5 years ago

Thanks. I just rebased this on top of master.