The opamdiff for a duniverse attempts to parse the x-opam-monorepo-duniverse-dirs

Previously, an entry pinned to a commit, such as openvpn:
    [
      "git+https://github.com/roburio/openvpn.git#5041b2837fe299138fae95649cb812a3930be163"
      "openvpn"
    ]

couldn't be decoded (since the form was assumed to be List [ URL ; DIR ; HASHES ]

Now, the parser is extended to cope with List [ URL ; DIR ] as well.

Seen on https://builds.robur.coop/compare/dde0380c-11f8-4e4f-8e91-d4ffcf5f4e08/35d0bddc-e118-44c5-bbba-f5e53cccca2d
This commit is contained in:
Hannes Mehnert 2023-03-03 12:44:30 +01:00 committed by Robur
parent ab45412a7c
commit 64045f7dec

View file

@ -39,7 +39,11 @@ let duniverse_dirs_data =
in in
let* dir = string ~ctx:"directory" dir in let* dir = string ~ctx:"directory" dir in
Ok (url, dir, List.rev hashes) Ok (url, dir, List.rev hashes)
| _ -> Error (`Msg "expected a string or identifier") | { pelem = List { pelem = [ url ; dir ] ; _ } ; _ } ->
let* url = string ~ctx:"url" url in
let* dir = string ~ctx:"directory" dir in
Ok (url, dir, [])
| _ -> Error (`Msg "expected a list of URL, DIR, [HASHES]")
in in
function function
| { pelem = List { pelem = lbody ; _ } ; _ } -> | { pelem = List { pelem = lbody ; _ } ; _ } ->