diff --git a/bin/common.ml b/bin/common.ml index 76670d87001..2ce0bc66bfd 100644 --- a/bin/common.ml +++ b/bin/common.ml @@ -595,7 +595,6 @@ module Builder = struct ; require_dune_project_file : bool ; watch_exclusions : string list ; build_dir : string - ; store_digest_preimage : bool ; root : string option ; stats_trace_file : string option ; stats_trace_extended : bool @@ -667,19 +666,6 @@ module Builder = struct [ "debug-digests" ] ~docs ~doc:"Explain why Dune decides to re-digest some files") - and+ store_digest_preimage = - Arg.( - value - & flag - & info - [ "debug-store-digest-preimage" ] - ~docs - ~doc: - "Store digest preimage for all computed digests, so that it's possible to \ - reverse them later, for debugging. The digests are stored in the shared \ - cache (see --cache flag) as values, even if cache is otherwise disabled. \ - This should be used only for debugging, since it's slow and it litters \ - the shared cache.") and+ no_buffer = let doc = "Do not buffer the output of commands executed by dune. By default dune buffers \ @@ -1025,7 +1011,6 @@ module Builder = struct ; require_dune_project_file ; watch_exclusions ; build_dir = Option.value ~default:default_build_dir build_dir - ; store_digest_preimage ; root ; stats_trace_file ; stats_trace_extended @@ -1182,7 +1167,6 @@ let build (builder : Builder.t) = action_runner)) else `Forbid_builds in - if builder.store_digest_preimage then Dune_engine.Reversible_digest.enable (); if builder.print_metrics then Dune_metrics.enable (); { builder; root; rpc; stats } ;; diff --git a/src/dune_engine/dune_engine.ml b/src/dune_engine/dune_engine.ml index b42d1ba2c21..88dd15633ed 100644 --- a/src/dune_engine/dune_engine.ml +++ b/src/dune_engine/dune_engine.ml @@ -31,7 +31,6 @@ module Fs_cache = Fs_cache module Fs_memo = Fs_memo module Execution_parameters = Execution_parameters module Cache_debug_flags = Cache_debug_flags -module Reversible_digest = Reversible_digest module Report_errors_config = Report_errors_config module Compound_user_error = Compound_user_error module Reflection = Reflection diff --git a/src/dune_engine/reversible_digest.ml b/src/dune_engine/reversible_digest.ml deleted file mode 100644 index a98bbd6f997..00000000000 --- a/src/dune_engine/reversible_digest.ml +++ /dev/null @@ -1,30 +0,0 @@ -open Import - -let digest_string string = - let digest = Digest.Direct_impl.string string in - (match - (* CR-someday amokhov: Below we do not respect the [cache_storage_mode] - configuration setting. This will break if hard links are not - supported. *) - Dune_cache_storage.Raw_value.store_unchecked - ~content:string - ~content_digest:digest - ~mode:Hardlink - with - | Ok | Already_present -> () - | Error exn -> - Log.info - [ Pp.textf - "error making digest reversible [%s]: %s" - (Digest.to_string digest) - (Dyn.to_string (Exn.to_dyn exn)) - ]); - digest -;; - -let digest_file file = - let contents = Io.String_path.read_file ~binary:true file in - digest_string contents -;; - -let enable () = Digest.override_impl ~file:digest_file ~string:digest_string diff --git a/src/dune_engine/reversible_digest.mli b/src/dune_engine/reversible_digest.mli deleted file mode 100644 index 83cdcc659cd..00000000000 --- a/src/dune_engine/reversible_digest.mli +++ /dev/null @@ -1,5 +0,0 @@ -open Import - -val digest_string : string -> Digest.t -val digest_file : string -> Digest.t -val enable : unit -> unit