summaryrefslogtreecommitdiff
path: root/lib/error.ml
diff options
context:
space:
mode:
authorCrash Over Burn2026-04-14 13:05:33 +0000
committerยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค2026-04-14 13:05:33 +0000
commite6c901d2e5430a3815109b38ced11a4f695f0226 (patch)
tree07a4cf8846035d5968f7a78007f71cc1fc6dd6fc /lib/error.ml
parent26fef65e28c3f085d33a5d222aa1dbac245ec435 (diff)
downloadnixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar
nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.gz
nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.bz2
nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.lz
nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.xz
nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.tar.zst
nixtaml-e6c901d2e5430a3815109b38ced11a4f695f0226.zip
Port upstream patches: Cmdliner 2.x, lockfile auto-creation, schema upgrade, Fossil VCS
Ported from upstream darcs repository (v1.1.2): - Cmdliner 2.x compatibility fixes (variable shadowing) - Lockfile auto-creation when missing - Schema upgrade command with backup/rollback - Fossil VCS support (new VCS type) - Clean up Cmdliner warning for unescaped $PWD Files modified: - lib/schema.ml (new): Schema versioning module - lib/nixtamal.ml: Add upgrade function, Fossil meld support - lib/error.ml: Add Fossil to prefetch_method, Upgrade error - lib/input.ml: Add Fossil module, Kind variant - lib/prefetch.ml: Add Fossil prefetch with SRI hash support - lib/manifest.ml: Add Fossil codec - lib/lockfile.ml: Add Fossil lockfile type - lib/lock_loader.ml: Add Fossil feature flag - lib/input_foreman.ml: Add Fossil display and prefetch check - bin/cmd.ml: Cmdliner 2.x fixes, add Upgrade command - bin/dune, lib/dune, test/dune: Deprecation flags Builds successfully with all tests passing.
Diffstat (limited to 'lib/error.ml')
-rw-r--r--lib/error.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/error.ml b/lib/error.ml
index da9a271..ba92eac 100644
--- a/lib/error.ml
+++ b/lib/error.ml
@@ -25,6 +25,8 @@ type prefetch_method = [
| `Git
| `Darcs
| `Pijul
+ | `Nilla
+ | `Fossil
]
[@@deriving show]
@@ -34,6 +36,7 @@ type prefetch_error = [
| `JSON_parsing of prefetch_method * string
| `Darcs_context of string
| `Run_exception of prefetch_method * exn * string
+ | `Not_implemented of prefetch_method * string
]
[@@deriving show]
@@ -55,6 +58,7 @@ type error = [
| `Manifest of manifest_error
| `Lockfile of lockfile_error
| `Version_mismatch of string * string
+ | `Upgrade of string
| `Input_foreman of input_foreman_error
]
[@@deriving show]
@@ -75,5 +79,7 @@ let pp ppf = function
Fmt.(pf ppf "%a" pp_lockfile_error err)
| `Version_mismatch (mnfst, lock) ->
Fmt.pf ppf "Version mismatch: Manifest@@%s & Lockfile@@%s" mnfst lock
- | `Input_foreman (`CouldNotAdd name) ->
- Fmt.pf ppf "Could not set %a" Name.pp name
+ | `Upgrade msg ->
+ Fmt.pf ppf "Upgrade error: %s" msg
+ | `Input_foreman err ->
+ Fmt.(pf ppf "%a" pp_input_foreman_error err)