| 1 |
When compiling vendored code, all alerts should be disabled |
| 2 |
|
| 3 |
$ cat > dune << EOF |
| 4 |
> (rule |
| 5 |
> (alias no-alerts-please) |
| 6 |
> (deps vendored/lib.cmxa) |
| 7 |
> (action (echo "There should be no OCaml alerts!"))) |
| 8 |
> EOF |
| 9 |
$ dune build @no-alerts-please |
| 10 |
File "vendored/lib.ml", line 1, characters 8-24: |
| 11 |
1 | let x = Trigger_alerts.x |
| 12 |
^^^^^^^^^^^^^^^^ |
| 13 |
Alert alertx: Lib__.Trigger_alerts.x |
| 14 |
You should not use x |
| 15 |
|
| 16 |
File "vendored/lib.ml", line 3, characters 8-24: |
| 17 |
3 | let y = Trigger_alerts.y |
| 18 |
^^^^^^^^^^^^^^^^ |
| 19 |
Alert alerty: Lib__.Trigger_alerts.y |
| 20 |
You should not use y |
| 21 |
File "vendored/lib.ml", line 1, characters 8-24: |
| 22 |
1 | let x = Trigger_alerts.x |
| 23 |
^^^^^^^^^^^^^^^^ |
| 24 |
Alert alertx: Lib__.Trigger_alerts.x |
| 25 |
You should not use x |
| 26 |
|
| 27 |
File "vendored/lib.ml", line 3, characters 8-24: |
| 28 |
3 | let y = Trigger_alerts.y |
| 29 |
^^^^^^^^^^^^^^^^ |
| 30 |
Alert alerty: Lib__.Trigger_alerts.y |
| 31 |
You should not use y |
| 32 |
There should be no OCaml alerts! |
| 33 |
$ echo '(vendored_dirs vendored)' >> dune |
| 34 |
$ dune clean |
| 35 |
$ dune build @no-alerts-please |
| 36 |
There should be no OCaml alerts! |