Skip to content

merkle_ledger: deactivate warnings is actually useless #17165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 8, 2025
Merged
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
11 changes: 1 addition & 10 deletions src/lib/merkle_ledger/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
(name merkle_ledger)
(public_name merkle_ledger)
(flags
; Deactivated warnings
; 40: name-out-scope (activate later)
;
; 41: ambiguous name (too many of them for now, activate later)
;
; 42: disambiguated-name (rely on type disambiguation ,not too bad but closer
; module openings may both solve the warning *and* help the reader)
;
; 44: open-shadow-identifier (operation overloading is common in the codebase)
(:standard -w +a-40..42-44 -warn-error +a-70 -open Core_kernel))
(:standard -open Core_kernel))
(library_flags -linkall)
(modules_without_implementation location_intf)
(libraries
Expand Down
4 changes: 0 additions & 4 deletions src/lib/merkle_ledger/location.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,9 @@ module T = struct
let hash ~ledger_depth depth = UInt8.of_int (ledger_depth - depth)
end

[@@@warning "-4"] (* disabled because of deriving sexp *)

type t = Generic of Bigstring.t | Account of Addr.t | Hash of Addr.t
[@@deriving hash, sexp, compare]

[@@@warning "+4"]

let is_generic = function Generic _ -> true | Account _ | Hash _ -> false

let is_account = function Account _ -> true | Generic _ | Hash _ -> false
Expand Down
2 changes: 1 addition & 1 deletion src/lib/merkle_ledger/merkle_path.mli
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module type S = sig

val implied_root : t -> hash -> hash

(** [check_path path leaf_hash root_hash] is used in tests to check that
(** [check_path path leaf_hash root_hash] is used in tests to check that
[leaf_hash] along with [path] actually corresponds to [root_hash]. *)
val check_path : t -> hash -> hash -> bool
end
Expand Down