Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/changes/added/14492.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- Filter inter-library dependencies per-module using `ocamldep` output, and
match the `-I`/`-H` include flags to that filter. When a dependency
library's cmi changes, only consumer modules that reference it get rebuilt
— eliminating spurious recompilations of unrelated sibling modules.
Applies to unwrapped dependency libraries; wrapped libraries continue to
use a glob over the whole library's objdir. (#14492, fixes #4572,
@robinbb)
583 changes: 583 additions & 0 deletions doc/dev/per-module-narrowing.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/dune_lang/lib_mode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ let equal x y =
| Melange, Melange -> true
;;

let hash = function
| Ocaml Byte -> 0
| Ocaml Native -> 1
| Melange -> 2
;;

let decode =
let open Decoder in
enum [ "byte", Ocaml Byte; "native", Ocaml Native; "melange", Melange ]
Expand Down
1 change: 1 addition & 0 deletions src/dune_lang/lib_mode.mli
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type t =

val decode : t Decoder.t
val equal : t -> t -> bool
val hash : t -> int
val to_dyn : t -> Dyn.t

module Cm_kind : sig
Expand Down
Loading
Loading