Stream: Dune devs & users

Topic: How to turn off "warnings are errors"?


view this post on Zulip Jim Fehrle (May 22 2021 at 18:57):

How can I turn off "warnings are errors" for OCaml compiles when I build locally? I'd like this as my normal local setting rather than, say, having to provide an extra command line parameter or modifying dune files in the source tree. (If I have an unused variable/function, I usually don't care about that until I'm about to submit a PR. (Working on Coq FWIW.)

view this post on Zulip Emilio Jesús Gallego Arias (May 25 2021 at 10:45):

Add a dune-workspace file to the root of Coq, with the updated warning settings you'd like for your project

view this post on Zulip Emilio Jesús Gallego Arias (May 25 2021 at 10:45):

Note that this is an area that has been marked as insatisfactory and will get a full revamp in Dune 3.0

view this post on Zulip Théo Zimmermann (May 25 2021 at 11:08):

Can you be more specific on how to update the warnings? Should the developers using that technique also repeat the other OCaml flags normally passed during a build of Coq?

view this post on Zulip Emilio Jesús Gallego Arias (May 25 2021 at 11:10):

I need to look the specific details up, but I think :standard should do the trick (flags :standard -w -3) for example; I have a PR where I planned to document this, but we found a bug in the implementation of Coq flags so we need to fix it first https://github.com/coq/coq/pull/14241

Still on holidays for a few days more so don't expect a lot of progress this week, sorry.

view this post on Zulip Emilio Jesús Gallego Arias (May 25 2021 at 23:33):

Note that doing something such as export DUNEOPT="--workspace=path_to_my_own_config" is likely the easiest way as of today [dune also supports setting the workspace using an env var]

view this post on Zulip Emilio Jesús Gallego Arias (May 25 2021 at 23:33):

Makefile.dune does support that variable


Last updated: Jun 03 2023 at 15:31 UTC