From 59a0c577100fce450bbc6309277ec8820e544b6d Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 23 Aug 2018 12:01:48 +0300 Subject: [PATCH] Go back to Dsexp for taking hash for stamp Signed-off-by: Rudi Grinberg --- src/build_system.ml | 2 +- src/build_system.mli | 2 +- src/inline_tests.ml | 4 ++-- src/preprocessing.ml | 6 +++--- src/simple_rules.ml | 8 ++++---- src/super_context.mli | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/build_system.ml b/src/build_system.ml index 91347ef9..066eb887 100644 --- a/src/build_system.ml +++ b/src/build_system.ml @@ -1621,7 +1621,7 @@ module Alias = struct let add_action build_system t ~context ~loc ?(locks=[]) ~stamp action = 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 ; locks ; context diff --git a/src/build_system.mli b/src/build_system.mli index 3298b92f..9bd01cc4 100644 --- a/src/build_system.mli +++ b/src/build_system.mli @@ -174,7 +174,7 @@ module Alias : sig -> context:Context.t -> loc:Loc.t option -> ?locks:Path.t list - -> stamp:Sexp.t + -> stamp:Dsexp.t -> (unit, Action.t) Build.t -> unit end with type build_system := t diff --git a/src/inline_tests.ml b/src/inline_tests.ml index b1902209..76c93fb4 100644 --- a/src/inline_tests.ml +++ b/src/inline_tests.ml @@ -261,8 +261,8 @@ include Sub_system.Register_end_point( SC.add_alias_action sctx ~loc:(Some info.loc) (Build_system.Alias.runtest ~dir) - ~stamp:(List [ Sexp.Atom "ppx-runner" - ; Atom name + ~stamp:(List [ Dsexp.unsafe_atom_of_string "ppx-runner" + ; Quoted_string name ]) (let module A = Action in let exe = Path.relative inline_test_dir (name ^ ".exe") in diff --git a/src/preprocessing.ml b/src/preprocessing.ml index 02247a26..64592f02 100644 --- a/src/preprocessing.ml +++ b/src/preprocessing.ml @@ -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 add_alias fn build = SC.add_alias_action sctx alias build - ~stamp:(List [ Sexp.Atom "lint" - ; Sexp.To_sexp.(option string) lib_name - ; Path.sexp_of_t fn + ~stamp:(List [ Dsexp.unsafe_atom_of_string "lint" + ; Dsexp.To_sexp.(option string) lib_name + ; Path_dsexp.dgen fn ]) in let lint = diff --git a/src/simple_rules.ml b/src/simple_rules.ml index 1d631eae..713ec8fa 100644 --- a/src/simple_rules.ml +++ b/src/simple_rules.ml @@ -90,10 +90,10 @@ let alias sctx ~dir ~scope (alias_conf : Alias_conf.t) = Blang.eval_bool blang ~dir ~f in let stamp = - Sexp.List - [ Sexp.Atom "user-alias" - ; Dune_file.Bindings.sexp_of_t Dune_file.Dep_conf.sexp_of_t alias_conf.deps - ; Sexp.To_sexp.option Action.Unexpanded.sexp_of_t + Dsexp.List + [ Dsexp.unsafe_atom_of_string "user-alias" + ; Dune_file.Bindings.dgen Dune_file.Dep_conf.dgen alias_conf.deps + ; Dsexp.To_sexp.option Action.Unexpanded.dgen (Option.map alias_conf.action ~f:snd) ] in diff --git a/src/super_context.mli b/src/super_context.mli index be99ede3..6dbc1429 100644 --- a/src/super_context.mli +++ b/src/super_context.mli @@ -151,7 +151,7 @@ val add_alias_action -> Build_system.Alias.t -> loc:Loc.t option -> ?locks:Path.t list - -> stamp:Sexp.t + -> stamp:Dsexp.t -> (unit, Action.t) Build.t -> unit