···11-When compiling with -no-alias-deps, module aliases produce imports without
22-digests. odoc should not try to resolve these imports, as looking them up in
33-the include path could find stale artifacts from a previous build, associating
44-a wrong digest and breaking incremental rebuilds.
55-66-Compile b.mli normally, and a.ml with -no-alias-deps. Module A contains
77-`module B = B`, so B appears as an import of A without a digest.
88-99- $ ocamlc -c -bin-annot b.mli
1010- $ ocamlc -c -bin-annot -no-alias-deps -w -49 a.ml
1111-1212-Verify that B has no digest in the compiled .cmt:
1313-1414- $ ocamlobjinfo a.cmt | grep " -------------------------------- B" | head -1
1515- -------------------------------- B
1616-1717-compile-deps correctly omits imports without digests:
1818-1919- $ odoc compile-deps a.cmt | cut -d ' ' -f 1 | sort
2020- A
2121- CamlinternalFormatBasics
2222- Stdlib
2323-2424-Compile both with odoc. B's .odoc is present in the include path.
2525-2626- $ odoc compile --pkg test -I . b.cmti
2727- $ odoc compile --pkg test -I . a.cmt
2828-2929-B should remain unresolved in A's imports, since it had no digest:
3030-3131- $ odoc_print a.odoc | grep 'Unresolved.*"B"'
3232- { "Unresolved": [ "B", "None" ] },
3333-3434-link-deps should not report B as a dependency:
3535-3636- $ odoc link-deps . | grep B
3737- [1]