Stream: Dune devs & users

Topic: Handling alerts in Dune

view this post on Zulip Karl Palmskog (Sep 30 2020 at 16:08):

Currently, the Coq extraction mechanism generates code that creates Alerts in OCaml (see Hence, all extraction-based OCaml projects that use the Coq files indicated in the issue will always fail to compile in Dune. Here is my current solution for this:

(flags :standard -warn-error -a)

Is there any other more specific way to solve this? The ocamlc documentation seemingly doesn't even talk about alerts, and ocamlbuild doesn't care, only Dune. Basically, there is no specific number x to use -w -x for.

view this post on Zulip Emilio Jesús Gallego Arias (Sep 30 2020 at 16:15):

There was a way to disable alerts specifically indeed but I forgot

view this post on Zulip Karl Palmskog (Oct 01 2020 at 12:28):

I tried a bunch of different numbers, and it seems -3 works in the end.

view this post on Zulip Rudi Grinberg (Nov 29 2020 at 22:36):

Usually the best way to address this issue is to modify the code generator to emit warning silencing attributes ([@@@ocaml.warning "-3"]) for example. That makes it work with any build system/warning level.

Last updated: May 25 2024 at 20:01 UTC