Go back to Dsexp for taking hash for stamp

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-08-23 12:01:48 +03:00
parent ca6e7c04bd
commit 59a0c57710
6 changed files with 12 additions and 12 deletions

View File

@ -1621,7 +1621,7 @@ module Alias = struct
let add_action build_system t ~context ~loc ?(locks=[]) ~stamp action = let add_action build_system t ~context ~loc ?(locks=[]) ~stamp action =
let def = get_alias_def build_system t in let def = get_alias_def build_system t in
def.actions <- { stamp = Digest.string (Sexp.to_string stamp) def.actions <- { stamp = Digest.string (Dsexp.to_string ~syntax:Dune stamp)
; action ; action
; locks ; locks
; context ; context

View File

@ -174,7 +174,7 @@ module Alias : sig
-> context:Context.t -> context:Context.t
-> loc:Loc.t option -> loc:Loc.t option
-> ?locks:Path.t list -> ?locks:Path.t list
-> stamp:Sexp.t -> stamp:Dsexp.t
-> (unit, Action.t) Build.t -> (unit, Action.t) Build.t
-> unit -> unit
end with type build_system := t end with type build_system := t

View File

@ -261,8 +261,8 @@ include Sub_system.Register_end_point(
SC.add_alias_action sctx SC.add_alias_action sctx
~loc:(Some info.loc) ~loc:(Some info.loc)
(Build_system.Alias.runtest ~dir) (Build_system.Alias.runtest ~dir)
~stamp:(List [ Sexp.Atom "ppx-runner" ~stamp:(List [ Dsexp.unsafe_atom_of_string "ppx-runner"
; Atom name ; Quoted_string name
]) ])
(let module A = Action in (let module A = Action in
let exe = Path.relative inline_test_dir (name ^ ".exe") in let exe = Path.relative inline_test_dir (name ^ ".exe") in

View File

@ -463,9 +463,9 @@ let lint_module sctx ~dir ~dep_kind ~lint ~lib_name ~scope ~dir_kind =
let alias = Build_system.Alias.lint ~dir in let alias = Build_system.Alias.lint ~dir in
let add_alias fn build = let add_alias fn build =
SC.add_alias_action sctx alias build SC.add_alias_action sctx alias build
~stamp:(List [ Sexp.Atom "lint" ~stamp:(List [ Dsexp.unsafe_atom_of_string "lint"
; Sexp.To_sexp.(option string) lib_name ; Dsexp.To_sexp.(option string) lib_name
; Path.sexp_of_t fn ; Path_dsexp.dgen fn
]) ])
in in
let lint = let lint =

View File

@ -90,10 +90,10 @@ let alias sctx ~dir ~scope (alias_conf : Alias_conf.t) =
Blang.eval_bool blang ~dir ~f Blang.eval_bool blang ~dir ~f
in in
let stamp = let stamp =
Sexp.List Dsexp.List
[ Sexp.Atom "user-alias" [ Dsexp.unsafe_atom_of_string "user-alias"
; Dune_file.Bindings.sexp_of_t Dune_file.Dep_conf.sexp_of_t alias_conf.deps ; Dune_file.Bindings.dgen Dune_file.Dep_conf.dgen alias_conf.deps
; Sexp.To_sexp.option Action.Unexpanded.sexp_of_t ; Dsexp.To_sexp.option Action.Unexpanded.dgen
(Option.map alias_conf.action ~f:snd) (Option.map alias_conf.action ~f:snd)
] ]
in in

View File

@ -151,7 +151,7 @@ val add_alias_action
-> Build_system.Alias.t -> Build_system.Alias.t
-> loc:Loc.t option -> loc:Loc.t option
-> ?locks:Path.t list -> ?locks:Path.t list
-> stamp:Sexp.t -> stamp:Dsexp.t
-> (unit, Action.t) Build.t -> (unit, Action.t) Build.t
-> unit -> unit