FIX Support latest TOML
4 files changed, 23 insertions(+), 24 deletions(-)

M hll.conf
M hll.pins
M opam/packages/pds/pds.99999/opam
M src/pds/pds.ml
M hll.conf +2 -2
@@ 1,11 1,11 @@ 
 pds = { major_version = 5 }
 
-desc = "A tool to build Makefiles for Ocaml projects"
+desc = "A tool to build Makefiles for Ocaml projects."
 maintainer = "orbitz@gmail.com"
 authors = [ "orbitz@gmail.com" ]
 homepage = "https://hg.sr.ht/~mmatalka/pds"
 bug_reports = "https://todo.sr.ht/~mmatalka/pds"
-dev_repo = "ssh://hg@hg.sr.ht/~mmatalka/pds"
+dev_repo = "hg+ssh://hg@hg.sr.ht/~mmatalka/pds"
 
 build_deps = [ "crunch", "ocaml" ]
 

          
M hll.pins +1 -1
@@ 1,1 1,1 @@ 
-ocaml >= "4.02"
+ocaml > "4.02"

          
M opam/packages/pds/pds.99999/opam +1 -2
@@ 22,7 22,7 @@ depends: [
 	"ppx_deriving"
 	"process"
 	"sedlex"
-	"toml"
+	"toml" { >= "6.0.0" }
 ]
 
 authors: [

          
@@ 42,4 42,3 @@ url {
 }
 bug-reports: "https://bitbucket.org/mimirops/pds/issues"
 dev-repo: "git@bitbucket.org:mimirops/pds.git"
-

          
M src/pds/pds.ml +19 -19
@@ 26,14 26,14 @@ end
 module Lookup = struct
   type t = { build_type : string
            ; selector : string option
-           ; builds_conf : TomlTypes.table
+           ; builds_conf : Toml.Types.table
            }
 
   let rec lookup c = function
     | [] ->
       None
     | x::xs ->
-      begin match TomlLenses.get c x with
+      begin match Toml.Lenses.get c x with
         | Some v -> Some v
         | None -> lookup c xs
       end

          
@@ 44,7 44,7 @@ module Lookup = struct
       (* The variables for release builds do not have a build type in their key. *)
       match t.selector with
         | Some selector when t.build_type = "release" ->
-          TomlLenses.([ key src_or_tests |-- table
+          Toml.Lenses.([ key src_or_tests |-- table
                         |-- key build_name |-- table
                         |-- key "selector" |-- table
                         |-- key selector |-- table

          
@@ 52,7 52,7 @@ module Lookup = struct
                       ])
         | Some selector ->
           (* Search first with the specific build type, then the release selector *)
-          TomlLenses.([ key src_or_tests |-- table
+          Toml.Lenses.([ key src_or_tests |-- table
                         |-- key build_name |-- table
                         |-- key "selector" |-- table
                         |-- key selector |-- table

          
@@ 69,7 69,7 @@ module Lookup = struct
     in
     let global_build_type = if test then "test-" ^ t.build_type else t.build_type in
     let global =
-      TomlLenses.([ key "global" |-- table
+      Toml.Lenses.([ key "global" |-- table
                     |-- key global_build_type |-- table
                     |-- key k |-- typ
                   ])

          
@@ 77,13 77,13 @@ module Lookup = struct
     let default =
       match t.build_type with
         | "release" ->
-          TomlLenses.([ key src_or_tests |-- table
+          Toml.Lenses.([ key src_or_tests |-- table
                         |-- key build_name |-- table
                         |-- key k |-- typ
                       ] @ if use_global then global else [])
         | build_type ->
           List.flatten
-            TomlLenses.([ [ key src_or_tests |-- table
+            Toml.Lenses.([ [ key src_or_tests |-- table
                             |-- key build_name |-- table
                             |-- key build_type |-- table
                             |-- key k |-- typ

          
@@ 100,17 100,17 @@ module Lookup = struct
   let strings ?(use_global = false) ?(test = false) t build_name k =
     lookup
       t.builds_conf
-      (build_lookup use_global test t build_name k TomlLenses.(array |-- strings))
+      (build_lookup use_global test t build_name k Toml.Lenses.(array |-- strings))
 
   let string ?(use_global = false) ?(test = false) t build_name k =
     lookup
       t.builds_conf
-      (build_lookup use_global test t build_name k TomlLenses.string)
+      (build_lookup use_global test t build_name k Toml.Lenses.string)
 
   let bool ?(use_global = false) ?(test = false) t build_name k =
     lookup
       t.builds_conf
-      (build_lookup use_global test t build_name k TomlLenses.bool)
+      (build_lookup use_global test t build_name k Toml.Lenses.bool)
 end
 
 let apply_and_write_template tmpl_name out_name kv =

          
@@ 212,11 212,11 @@ let get_tests () =
  *)
 let get_project_type builds_conf build =
   let project_type =
-    TomlLenses.(key "src" |-- table
+    Toml.Lenses.(key "src" |-- table
                    |-- key build |-- table
                    |-- key "project_type" |-- string)
   in
-  match TomlLenses.get builds_conf project_type with
+  match Toml.Lenses.get builds_conf project_type with
     | Some "third-party" ->
       `Third_party
     | Some "ocaml"

          
@@ 230,13 230,13 @@ let get_project_type builds_conf build =
  *)
 let get_project_target_type builds_conf build =
   let build_type =
-    TomlLenses.(key "src" |-- table
+    Toml.Lenses.(key "src" |-- table
                    |-- key build |-- table
                    |-- key "type" |-- string)
   in
   match get_project_type builds_conf build with
     | `Ocaml -> begin
-      match TomlLenses.get builds_conf build_type with
+      match Toml.Lenses.get builds_conf build_type with
         | Some "exec" ->
           `Exec
         | Some "library" | None ->

          
@@ 258,8 258,8 @@ let string_of_project_type = function
 let string_of_deps = String.concat ","
 
 let compute_selector builds_conf =
-  let path = TomlLenses.(key "global" |-- table |-- key "selector" |-- array |-- strings) in
-  match TomlLenses.(get builds_conf path) with
+  let path = Toml.Lenses.(key "global" |-- table |-- key "selector" |-- array |-- strings) in
+  match Toml.Lenses.(get builds_conf path) with
     | Some (cmd::args) ->
       begin match Process.read_stdout cmd (Array.of_list args) with
         | [] -> failwith "Selector produced empty output"

          
@@ 487,12 487,12 @@ let emit_builds lookup =
   let src =
     value_exn
       ~msg:"Missing 'src' section of config"
-      TomlLenses.(
+      Toml.Lenses.(
         get
           lookup.Lookup.builds_conf
           (key "src" |-- table))
   in
-  TomlTypes.Table.(iter
+  Toml.Types.Table.(iter
                      (fun build _ ->
                         if get_should_build lookup (Key.to_string build) then
                           emit_build lookup (Key.to_string build))

          
@@ 696,7 696,7 @@ let assert_builds_in_builds_conf builds 
        ignore
          (value_exn
             ~msg:(sprintf "Missing build %s in config" b)
-            TomlLenses.(get builds_conf (key "src" |-- table |-- key b |-- table))))
+            Toml.Lenses.(get builds_conf (key "src" |-- table |-- key b |-- table))))
     builds
 
 let emit_makefiles pds_conf =