Skip to content

Commit

Permalink
engine: fixed buggy construction of paths
Browse files Browse the repository at this point in the history
  • Loading branch information
pveber committed Dec 9, 2018
1 parent 02fd4a8 commit c0aaaca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/engine/scheduler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ let rec blocking_evaluator
let dir_path = dir () in
Sys.readdir (Db.path db dir_path)
|> Array.to_list
|> List.map ~f:(fun fn -> W.Cd (dir_path, [fn]))
|> List.map ~f:(fun fn -> W.cd dir_path [fn])

let rec shallow_eval
: type s. _ t -> s W.t -> s Lwt.t
Expand Down Expand Up @@ -544,7 +544,7 @@ let rec shallow_eval
shallow_eval sched g.dir >>= fun p ->
Db.path sched.db p |>
Misc.files_in_dir >|= fun files ->
List.map files ~f:(fun fn -> W.Cd (p, [fn]))
List.map files ~f:(fun fn -> W.cd p [fn])

and shallow_eval_command sched =
let list xs = Lwt_list.map_p (shallow_eval_command sched) xs in
Expand Down
4 changes: 4 additions & 0 deletions lib/internals/workflow.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ type path =
| Cache_id of string
| Cd of path * string list

let cd dir sel = match dir with
| Cd (indir, insel) -> Cd (indir, insel @ sel)
| FS_path _ | Cache_id _ -> Cd (dir, sel)

type _ t =
| Pure : { id : string ; value : 'a } -> 'a t
| App : {
Expand Down

0 comments on commit c0aaaca

Please sign in to comment.