realworldocaml / mdx

Execute code blocks inside your documentation
ISC License
269 stars 45 forks source link

dune-gen does not support non-deterministic mode #365

Closed emillon closed 2 years ago

emillon commented 2 years ago

Hi,

It seems that dune-gen (used by stanza 0.2) does not support setting non-deterministic mode:

https://github.com/realworldocaml/mdx/blob/4942357cad00307d787c5d117ce4941678b39296/bin/dune_gen.ml#L35-L41

If we want MDX_RUN_NON_DETERMINISTIC=1 dune runtest to work, this needs be supported and dune to be adjusted so that it knows about the envvar dependency.

Leonidas-from-XIV commented 2 years ago

Thanks for the report and the debugging. From the MDX side this should be quite easy to fix.

Does dune pass all the environment options as-is to the binary produced by dune-gen? Or are there other adjustments that are necessary to do?