Skip to content

Commit

Permalink
Make opam-client compatible with extlib 1.8.6 by switching to base64
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Jul 26, 2021
1 parent 2e03a20 commit 4d8229e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion opam-client.opam
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ depends: [
"ocaml" {>= "4.02.3"}
"opam-state" {= version}
"opam-solver" {= version}
"extlib" {>= "1.7.3" & < "1.7.8"}
"base64" {>= "3.1.0"}
"opam-repository" {= version}
"re" {>= "1.9.0"}
"cmdliner" {>= "1.0.0"}
Expand Down
2 changes: 1 addition & 1 deletion src/client/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(public_name opam-client)
(synopsis "OCaml Package Manager client and CLI library")
(modules (:standard \ opamMain get_git_version))
(libraries opam-state opam-solver opam-repository re extlib cmdliner)
(libraries opam-state opam-solver opam-repository re base64 cmdliner)
(flags (:standard
(:include ../ocaml-flags-standard.sexp)
(:include ../ocaml-flags-configure.sexp)
Expand Down
2 changes: 1 addition & 1 deletion src/client/opamSwitchCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ let import_t ?ask importfile t =
OpamPath.Switch.extra_files_dir t.switch_global.root t.switch
in
OpamHash.Map.iter (fun hash content ->
let value = Base64.decode_string content in
let value = Base64.decode_exn content in
let my = OpamHash.compute_from_string ~kind:(OpamHash.kind hash) value in
if OpamHash.contents my = OpamHash.contents hash then
let dst =
Expand Down

0 comments on commit 4d8229e

Please sign in to comment.