Disable old syntax for opam contexts in dune-workspace files

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
This commit is contained in:
Jeremie Dimino 2018-06-29 22:59:54 +01:00 committed by Rudi Grinberg
parent d5ae6dede0
commit cdcc520430
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,5 @@
(lang dune 1.0)
;; This file is used by `make all-supported-ocaml-versions`
(context (opam (switch 4.02.3)))
(context (opam (switch 4.03.0)))

View File

@ -106,9 +106,13 @@ module Context = struct
]
let t ~profile ~x =
peek_exn >>= function
| List (_, List _ :: _) ->
record (Opam.t ~profile ~x) >>| fun x -> Opam x
Syntax.get_exn syntax >>= function
| (0, _) ->
(* jbuild-workspace files *)
(peek_exn >>= function
| List (_, List _ :: _) ->
Sexp.Of_sexp.record (Opam.t ~profile ~x) >>| fun x -> Opam x
| _ -> t ~profile ~x)
| _ -> t ~profile ~x
let name = function