The warnings improvements are, I think, one of the most immediately useful of the new features. As a motivating example, I’ll use the patricia-tree package. Checking out the v0.11.0 tag and building the docs with dune build @doc
, you get:
➜ patricia-tree git:(v0.11.0) ✗ dune build @doc
File "src/signatures.ml", line 174, characters 6-51:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 129, character 0
While resolving the expansion of include at File "src/functors.mli", line 199, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 214, characters 6-43:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 129, character 0
While resolving the expansion of include at File "src/functors.mli", line 199, character 2
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 209, characters 6-43:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 129, character 0
While resolving the expansion of include at File "src/functors.mli", line 199, character 2
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 174, characters 6-51:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 129, character 0
While resolving the expansion of include at File "src/functors.mli", line 199, character 2
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
While resolving the expansion of include at File "src/signatures.ml", line 198, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 766, characters 6-23:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 129, character 0
While resolving the expansion of include at File "src/functors.mli", line 183, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 761, characters 6-23:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 129, character 0
....
hundreds of repetitive lines removed
...
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 209, characters 6-43:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 174, characters 6-51:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
While resolving the expansion of include at File "src/signatures.ml", line 198, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 174, characters 6-51:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 214, characters 6-43:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 209, characters 6-43:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 174, characters 6-51:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
While resolving the expansion of include at File "src/signatures.ml", line 623, character 2
While resolving the expansion of include at File "src/signatures.ml", line 198, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 214, characters 6-43:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 209, characters 6-43:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 174, characters 6-51:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
While resolving the expansion of include at File "src/signatures.ml", line 198, character 2
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/signatures.ml", line 174, characters 6-51:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 125, character 0
Failed to resolve reference unresolvedroot(Not_found) Couldn't find "Not_found"
File "src/ints.mli", line 63, characters 16-23:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 121, character 0
Reference to 'mask' is ambiguous. Please specify its kind: type-mask, val-mask.
The vast majority of this is entirely unfixable as the errors aren’t really related to the souce of the project. In contrast, with odoc_driver
, you get:
➜ patricia-tree git:(v0.11.0) ✗ dune build @install
➜ patricia-tree git:(v0.11.0) ✗ dune exec -- odoc_driver patricia-tree
Deciding which packages to build...
Performing module-level dependency analysis...
Starting the compilation process...
Documentation generation complete. Results are in _html/
Output from commands:
/var/folders/n6/tnqs3c8x4y522ymyy2xgvd6c0000gn/T/odoc-4ff9ce/patricia-tree/patricia-tree/patriciaTree.odoc
----------------------------------------------------------------------------------------------------------
File "src/ints.mli", line 63, characters 16-23:
Warning: While resolving the expansion of include at File "src/PatriciaTree.mli", line 121, character 0
Reference to 'mask' is ambiguous. Please specify its kind: type-mask, val-mask.
And here the warning is very fixable.