Skip to content

Commit

Permalink
Remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Oct 20, 2021
1 parent 539750b commit 521f343
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 0 additions & 5 deletions dune-workspace

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/monorepo/git_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ end

let id_of_repo repo =
let pp_hex f d =
for x = 0 to Cstruct.len d - 1 do
for x = 0 to Cstruct.length d - 1 do
let byte = Cstruct.get_uint8 d x in
Fmt.pf f "%02x" byte
done
Expand Down
11 changes: 6 additions & 5 deletions src/lib/monorepo/opamfile.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
type t = OpamParserTypes.opamfile
type t = OpamParserTypes.FullPos.opamfile
type pkg = { name : string; version : string; repo : string }

let get_packages (opam_file : t) =
let open OpamParserTypes in
let opam_file = OpamParser.FullPos.to_opamfile opam_file in
let pin_depends =
List.find_map
(function
Expand All @@ -26,11 +27,11 @@ let get_packages (opam_file : t) =
| List (_, v) -> v
| _ -> failwith "failed to parse opam")

let marshal = OpamPrinter.opamfile
let unmarshal t = OpamParser.string t "monorepo.opam"
let marshal = OpamPrinter.FullPos.opamfile
let unmarshal t = OpamParser.FullPos.string t "monorepo.opam"
let digest x = marshal x |> Digest.string |> Digest.to_hex
let to_yojson f = `String (OpamPrinter.opamfile f)
let to_yojson f = `String (OpamPrinter.FullPos.opamfile f)

let of_yojson = function
| `String s -> Ok (OpamParser.string s "")
| `String s -> Ok (OpamParser.FullPos.string s "")
| _ -> Error "failed to parse opamfile"
2 changes: 1 addition & 1 deletion src/lib/monorepo/opamfile.mli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type t = OpamParserTypes.opamfile
type t = OpamParserTypes.FullPos.opamfile
type pkg = { name : string; version : string; repo : string }

val get_packages : t -> pkg list
Expand Down

0 comments on commit 521f343

Please sign in to comment.