My own OCaml monorepo using monopam
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

use_registry

+34
+19
lib/oi/use_registry.ml
··· 1 + type t = All | Archives | Never 2 + 3 + let to_string = function 4 + | All -> "all" 5 + | Archives -> "archives" 6 + | Never -> "never" 7 + 8 + let of_string s = 9 + match String.lowercase_ascii (String.trim s) with 10 + | "all" -> Ok All 11 + | "archives" -> Ok Archives 12 + | "never" -> Ok Never 13 + | other -> 14 + Error 15 + (Fmt.str 16 + "unknown --use-registry value %S (expected: all|archives|never)" 17 + other) 18 + 19 + let pp ppf t = Format.pp_print_string ppf (to_string t)
+15
lib/oi/use_registry.mli
··· 1 + (** What to consult the remote registry for, on a per-fetch basis. The two 2 + fetches the pipeline performs (binary layers, source archives) are gated 3 + independently so a CI registry-build can reuse cached source archives while 4 + regenerating every binary from scratch. *) 5 + 6 + type t = 7 + | All (** Binary layers AND source archives. *) 8 + | Archives (** Source archives only; build every layer from source. *) 9 + | Never (** Skip the registry; upstream source fetches still happen. *) 10 + 11 + val of_string : string -> (t, string) result 12 + (** [of_string "all"] / ["archives"] / ["never"]. Case-insensitive. *) 13 + 14 + val to_string : t -> string 15 + val pp : Format.formatter -> t -> unit