Improve the error message for the last commit
This commit is contained in:
parent
2c124a0221
commit
9498cb7013
|
@ -111,7 +111,7 @@ let report_error ?(map_fname=fun x->x) ppf exn ~backtrace =
|
|||
- external library %S is required in %s\n\
|
||||
This cannot work.\n"
|
||||
package
|
||||
(Path.to_string defined_locally_in)
|
||||
(Utils.jbuild_name_in ~dir:(Path.drop_build_context defined_locally_in))
|
||||
required_by
|
||||
required_by
|
||||
(Utils.jbuild_name_in ~dir:required_locally_in)
|
||||
|
|
|
@ -346,6 +346,11 @@ let extract_build_context_dir t =
|
|||
else
|
||||
None
|
||||
|
||||
let drop_build_context t =
|
||||
match extract_build_context t with
|
||||
| None -> t
|
||||
| Some (_, t) -> t
|
||||
|
||||
let exists t = Sys.file_exists (to_string t)
|
||||
let readdir t = Sys.readdir (to_string t) |> Array.to_list
|
||||
let is_directory t = Sys.is_directory (to_string t)
|
||||
|
|
|
@ -83,6 +83,9 @@ val extract_build_context : t -> (string * t) option
|
|||
*)
|
||||
val extract_build_context_dir : t -> (t * t) option
|
||||
|
||||
(** Drop the "_build/blah" prefix *)
|
||||
val drop_build_context : t -> t
|
||||
|
||||
val is_in_build_dir : t -> bool
|
||||
|
||||
val insert_after_build_dir_exn : t -> t -> t
|
||||
|
|
Loading…
Reference in New Issue