From 22cf958b0c74edb9694730f827e5dfe0a9cb373e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 2 Jul 2018 14:08:28 +0700 Subject: [PATCH] Add dune_version field for libraries This field is necessary to know how to generate .dune files for a particular library. Signed-off-by: Rudi Grinberg --- src/jbuild.ml | 3 +++ src/jbuild.mli | 1 + 2 files changed, 4 insertions(+) diff --git a/src/jbuild.ml b/src/jbuild.ml index 7b460de3..d6d8ef63 100644 --- a/src/jbuild.ml +++ b/src/jbuild.ml @@ -732,6 +732,7 @@ module Library = struct ; project : Dune_project.t ; sub_systems : Sub_system_info.t Sub_system_name.Map.t ; no_keep_locs : bool + ; dune_version : Syntax.Version.t } let t = @@ -763,6 +764,7 @@ module Library = struct field_b "no_keep_locs" >>= fun no_keep_locs -> Sub_system_info.record_parser () >>= fun sub_systems -> Dune_project.get_exn () >>= fun project -> + Syntax.get_exn Stanza.syntax >>= fun dune_version -> return { name ; public @@ -786,6 +788,7 @@ module Library = struct ; project ; sub_systems ; no_keep_locs + ; dune_version }) let has_stubs t = diff --git a/src/jbuild.mli b/src/jbuild.mli index e9048140..82174b7a 100644 --- a/src/jbuild.mli +++ b/src/jbuild.mli @@ -206,6 +206,7 @@ module Library : sig ; project : Dune_project.t ; sub_systems : Sub_system_info.t Sub_system_name.Map.t ; no_keep_locs : bool + ; dune_version : Syntax.Version.t } val has_stubs : t -> bool