this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge commit '8aa973ac7a1aad657246e3fd3e45bb2d401c85d8'

+53 -10
+1 -1
odoc-driver.opam
··· 35 35 depends: [ 36 36 "ocaml" {>= "5.1.0"} 37 37 "odoc" {= version} 38 - "dune" {>= "3.18.0"} 38 + "dune" {>= "3.21.0"} 39 39 "odoc-md" 40 40 "bos" 41 41 "fpath" {>= "0.7.3"}
+1 -1
odoc-md.opam
··· 28 28 depends: [ 29 29 "ocaml" {>= "4.14.0"} 30 30 "odoc" {= version} 31 - "dune" {>= "3.18.0"} 31 + "dune" {>= "3.21.0"} 32 32 "cmdliner" {>= "1.3.0"} 33 33 "cmarkit" 34 34 ]
+1 -1
odoc-parser.opam
··· 13 13 dev-repo: "git+https://github.com/ocaml/odoc.git" 14 14 doc: "https://ocaml.github.io/odoc/odoc_parser" 15 15 depends: [ 16 - "dune" {>= "3.18"} 16 + "dune" {>= "3.21"} 17 17 "ocaml" {>= "4.08.0" & < "5.5"} 18 18 "astring" 19 19 "camlp-streams"
+1 -1
sherlodoc.opam
··· 8 8 doc: "https://ocaml.github.io/odoc/" 9 9 bug-reports: "https://github.com/ocaml/odoc/issues" 10 10 depends: [ 11 - "dune" {>= "3.18"} 11 + "dune" {>= "3.21"} 12 12 "ocaml" {>= "4.0.8"} 13 13 "odoc" {= version} 14 14 "base64" {>= "3.5.1"}
+7 -1
src/odoc/compile.ml
··· 113 113 List.map 114 114 (function 115 115 | Lang.Compilation_unit.Import.Resolved _ as resolved -> resolved 116 - | Unresolved (name, _) as unresolved -> ( 116 + | Unresolved (_, None) as unresolved -> 117 + (* Don't try to resolve imports without a digest. Looking up 118 + modules in the include path could find stale artifacts from 119 + a previous build, associating the wrong digest with this 120 + import and breaking incremental rebuilds. *) 121 + unresolved 122 + | Unresolved (name, Some _) as unresolved -> ( 117 123 match Resolver.resolve_import resolver name with 118 124 | Some root -> Resolved (root, Names.ModuleName.make_std name) 119 125 | None -> unresolved))
+3 -5
src/xref2/errors.ml
··· 340 340 let open Component.Fmt in 341 341 let report_error ~non_fatal = 342 342 let r subject pp_a a = 343 - Lookup_failures.report ~non_fatal "Failed to %s %s %a%a" action subject pp_a 344 - a pp_tools_error tools_error 343 + Lookup_failures.report ~non_fatal "Failed to %s %s %a%a" action subject 344 + pp_a a pp_tools_error tools_error 345 345 in 346 346 let c = default in 347 347 let fmt_id fmt id = model_identifier c fmt (id :> Paths.Identifier.t) in ··· 377 377 match kind_of_error ~what tools_error with 378 378 | Some (`Root name) -> Lookup_failures.report_root ~name 379 379 | Some `OpaqueModule -> report_error ~non_fatal:true 380 - | None -> 381 - let non_fatal = match what with `Reference _ -> false | _ -> true in 382 - report_error ~non_fatal 380 + | None -> report_error ~non_fatal:false
+1
test/integration/no_alias_deps.t/a.ml
··· 1 + module B = B
+1
test/integration/no_alias_deps.t/b.mli
··· 1 + type t = int
+37
test/integration/no_alias_deps.t/run.t
··· 1 + When compiling with -no-alias-deps, module aliases produce imports without 2 + digests. odoc should not try to resolve these imports, as looking them up in 3 + the include path could find stale artifacts from a previous build, associating 4 + a wrong digest and breaking incremental rebuilds. 5 + 6 + Compile b.mli normally, and a.ml with -no-alias-deps. Module A contains 7 + `module B = B`, so B appears as an import of A without a digest. 8 + 9 + $ ocamlc -c -bin-annot b.mli 10 + $ ocamlc -c -bin-annot -no-alias-deps -w -49 a.ml 11 + 12 + Verify that B has no digest in the compiled .cmt: 13 + 14 + $ ocamlobjinfo a.cmt | grep " -------------------------------- B" | head -1 15 + -------------------------------- B 16 + 17 + compile-deps correctly omits imports without digests: 18 + 19 + $ odoc compile-deps a.cmt | cut -d ' ' -f 1 | sort 20 + A 21 + CamlinternalFormatBasics 22 + Stdlib 23 + 24 + Compile both with odoc. B's .odoc is present in the include path. 25 + 26 + $ odoc compile --pkg test -I . b.cmti 27 + $ odoc compile --pkg test -I . a.cmt 28 + 29 + B should remain unresolved in A's imports, since it had no digest: 30 + 31 + $ odoc_print a.odoc | grep 'Unresolved.*"B"' 32 + { "Unresolved": [ "B", "None" ] }, 33 + 34 + link-deps should not report B as a dependency: 35 + 36 + $ odoc link-deps . | grep B 37 + [1]