| 1 |
$ export BUILD_PATH_PREFIX_MAP=odoc=`command -v odoc` |
| 2 |
|
| 3 |
As configured in the `dune` file at the root, this should be an error: |
| 4 |
|
| 5 |
$ dune build --only-packages=foo_doc @doc-new |
| 6 |
File "../../../../foo_doc/foo.mld", line 4, characters 0-0: |
| 7 |
Error: End of text is not allowed in '[...]' (code). |
| 8 |
ERROR: Warnings have been generated. |
| 9 |
[1] |
| 10 |
|
| 11 |
Same for documentation in mli files: |
| 12 |
|
| 13 |
$ dune build --only-packages=foo_lib @doc-new |
| 14 |
File "foo_lib/foo.mli", line 1, characters 7-7: |
| 15 |
Error: End of text is not allowed in '[...]' (code). |
| 16 |
ERROR: Warnings have been generated. |
| 17 |
[1] |
| 18 |
|
| 19 |
These packages are in a nested env, the option is disabled, should success with warning printed: |
| 20 |
|
| 21 |
$ dune build --only-packages=bar_doc,bar_lib @doc-new |
| 22 |
File "../../../../sub_env/bar_doc/bar.mld", line 4, characters 0-0: |
| 23 |
Error: End of text is not allowed in '[...]' (code). |
| 24 |
ERROR: Warnings have been generated. |
| 25 |
File "sub_env/bar_lib/bar.mli", line 1, characters 7-7: |
| 26 |
Error: End of text is not allowed in '[...]' (code). |
| 27 |
ERROR: Warnings have been generated. |
| 28 |
[1] |
| 29 |
|
| 30 |
In release mode, no error: |
| 31 |
|
| 32 |
$ dune build -p foo_doc,foo_lib @doc-new |
| 33 |
(cd _build/default/_doc_new/odoc/local/foo_lib && odoc compile -I . -I ../../stdlib -o foo.odoc ../../../../foo_lib/.foo.objs/byte/foo.cmti -I ../../../index/local/foo_lib --parent 'page-"foo_lib"') |
| 34 |
File "foo_lib/foo.mli", line 1, characters 7-7: |
| 35 |
Warning: End of text is not allowed in '[...]' (code). |
| 36 |
(cd _build/default/_doc_new/odoc/local/foo_doc && odoc compile -o page-foo.odoc ../../../../foo_doc/foo.mld -I ../../../index/local/foo_doc --parent 'page-"foo_doc"') |
| 37 |
File "../../../../foo_doc/foo.mld", line 4, characters 0-0: |
| 38 |
Warning: End of text is not allowed in '[...]' (code). |