Remove dependence on Improt in Path
This commit is contained in:
parent
980f5037cc
commit
6dee7c9c39
|
@ -1,4 +1,4 @@
|
||||||
open Import
|
open Stdune
|
||||||
|
|
||||||
let explode_path =
|
let explode_path =
|
||||||
let rec loop path acc =
|
let rec loop path acc =
|
||||||
|
@ -272,6 +272,8 @@ let of_string ?error_loc s =
|
||||||
let t sexp = of_string (Sexp.Of_sexp.string sexp) ~error_loc:(Sexp.Ast.loc sexp)
|
let t sexp = of_string (Sexp.Of_sexp.string sexp) ~error_loc:(Sexp.Ast.loc sexp)
|
||||||
let sexp_of_t t = Sexp.atom_or_quoted_string (to_string t)
|
let sexp_of_t t = Sexp.atom_or_quoted_string (to_string t)
|
||||||
|
|
||||||
|
let initial_cwd = Sys.getcwd ()
|
||||||
|
|
||||||
let absolute fn =
|
let absolute fn =
|
||||||
if is_local fn then
|
if is_local fn then
|
||||||
Filename.concat initial_cwd fn
|
Filename.concat initial_cwd fn
|
||||||
|
@ -466,7 +468,7 @@ let insert_after_build_dir_exn =
|
||||||
if not (is_local a) || String.contains b '/' then error a b;
|
if not (is_local a) || String.contains b '/' then error a b;
|
||||||
match String.lsplit2 a ~on:'/' with
|
match String.lsplit2 a ~on:'/' with
|
||||||
| Some ("_build", rest) ->
|
| Some ("_build", rest) ->
|
||||||
sprintf "_build/%s/%s" b rest
|
Printf.sprintf "_build/%s/%s" b rest
|
||||||
| _ ->
|
| _ ->
|
||||||
error a b
|
error a b
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue