Fix error message about too many opam files

This commit is contained in:
Jeremie Dimino 2017-06-08 14:11:31 +01:00
parent 0a3abd96a1
commit b63718ada0
4 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,9 @@
1.0.0 (coming soon)
-------------------
- Fix the error message when there are more than one `<package>.opam`
file for a given pacakge
1.0+beta10 (08/06/2017)
-----------------------

View File

@ -210,7 +210,7 @@ let load ?(extra_ignored_subtrees=Path.Set.empty) () =
name
(String.concat ~sep:"\n"
(List.map pkgs ~f:(fun pkg ->
sprintf "- %s.opam" (Path.to_string pkg.Package.path)))))
sprintf "- %s" (Path.to_string (Package.opam_file pkg))))))
in
let scopes =
String_map.values packages

View File

@ -3,3 +3,5 @@ type t =
; path : Path.t
; version_from_opam_file : string option
}
let opam_file t = Path.relative t.path (t.name ^ ".opam")

9
src/package.mli Normal file
View File

@ -0,0 +1,9 @@
(** Information about a package defined in the workspace *)
type t =
{ name : string
; path : Path.t
; version_from_opam_file : string option
}
val opam_file : t -> Path.t