summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค2026-01-02 15:43:48 +0000
committerยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค2026-01-02 15:43:48 +0000
commit3a4d89a19e18bbc199f006464a7d705da8c0fe28 (patch)
tree5708a81114cab43ae80be943ed40e3a6a9b147af /lib
parent1f914c969287798a5dd32eed3e0d5516a5d6979e (diff)
downloadnixtaml-3a4d89a19e18bbc199f006464a7d705da8c0fe28.tar
nixtaml-3a4d89a19e18bbc199f006464a7d705da8c0fe28.tar.gz
nixtaml-3a4d89a19e18bbc199f006464a7d705da8c0fe28.tar.bz2
nixtaml-3a4d89a19e18bbc199f006464a7d705da8c0fe28.tar.lz
nixtaml-3a4d89a19e18bbc199f006464a7d705da8c0fe28.tar.xz
nixtaml-3a4d89a19e18bbc199f006464a7d705da8c0fe28.tar.zst
nixtaml-3a4d89a19e18bbc199f006464a7d705da8c0fe28.zip
Lockfile: make optional values mandatory, but null
Useful for hashing
Diffstat (limited to 'lib')
-rw-r--r--lib/lockfile.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/lockfile.ml b/lib/lockfile.ml
index 650dfb6..f48452f 100644
--- a/lib/lockfile.ml
+++ b/lib/lockfile.ml
@@ -128,10 +128,10 @@ module Git = struct
|> Object.mem "rp" URI.jsont ~enc: (fun i -> i.repository)
|> Object.mem "ms" (list URI.jsont) ~enc: (fun i -> i.mirrors)
(*|> Object.mem "rf" Reference.jsont ~enc: (fun i -> i.reference)*)
- |> Object.opt_mem "dt" string ~enc: (fun i -> i.datetime)
+ |> Object.mem "dt" (option string) ~enc: (fun i -> i.datetime)
|> Object.mem "sm" bool ~enc: (fun i -> i.submodules)
|> Object.mem "lf" bool ~enc: (fun i -> i.lfs)
- |> Object.opt_mem "lr" string ~enc: (fun i -> i.latest_revision)
+ |> Object.mem "lr" (option string) ~enc: (fun i -> i.latest_revision)
|> Object.finish
end
@@ -219,9 +219,9 @@ module Darcs = struct
)
|> Object.mem "rp" URI.jsont ~enc: (fun i -> i.repository)
|> Object.mem "ms" (list URI.jsont) ~enc: (fun i -> i.mirrors)
- |> Object.opt_mem "dt" string ~enc: (fun i -> i.datetime)
+ |> Object.mem "dt" (option string) ~enc: (fun i -> i.datetime)
|> Object.mem "rf" Reference.jsont ~enc: (fun i -> i.reference)
- |> Object.opt_mem "lw" string ~enc: (fun i -> i.latest_weak_hash)
+ |> Object.mem "lw" (option string) ~enc: (fun i -> i.latest_weak_hash)
|> Object.finish
end
@@ -285,7 +285,7 @@ module Pijul = struct
)
|> Object.mem "rm" URI.jsont ~enc: (fun i -> i.remote)
|> Object.mem "ms" (list URI.jsont) ~enc: (fun i -> i.mirrors)
- |> Object.opt_mem "dt" string ~enc: (fun i -> i.datetime)
+ |> Object.mem "dt" (option string) ~enc: (fun i -> i.datetime)
(* |> Object.mem "rf" Reference.jsont ~enc: (fun i -> i.reference) *)
|> Object.mem "ls" (option string) ~enc: (fun i -> i.latest_state)
|> Object.finish
@@ -399,7 +399,7 @@ module Input' = struct
Object.map ~kind: "Input_lock" (fun kind hash latest_value -> {kind; hash; latest_value})
|> Object.mem "kd" Kind.jsont ~enc: (fun i -> i.kind)
|> Object.mem "ha" Hash.jsont ~enc: (fun i -> i.hash)
- |> Object.opt_mem "lv" string ~enc: (fun i -> i.latest_value)
+ |> Object.mem "lv" (option string) ~enc: (fun i -> i.latest_value)
|> Object.finish
end