diff --git a/dune-workspace.dev b/dune-workspace.dev index 90cfb5c4..1c68f94c 100644 --- a/dune-workspace.dev +++ b/dune-workspace.dev @@ -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))) diff --git a/src/workspace.ml b/src/workspace.ml index 0f6ae390..07d9939c 100644 --- a/src/workspace.ml +++ b/src/workspace.ml @@ -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