Revert changes to resolve_user_deps

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-08-14 10:59:50 +03:00
parent 9849a7dbb0
commit e1cd3b9094
1 changed files with 14 additions and 4 deletions

View File

@ -814,16 +814,26 @@ and resolve_user_deps db deps ~allow_private_deps ~pps ~stack =
closure_with_overlap_checks None pps ~stack
in
let deps =
let rec check_runtime_deps acc pps = function
| [] -> loop acc pps
| lib :: ppx_rts ->
check_private_deps lib ~loc ~allow_private_deps >>= fun rt ->
check_runtime_deps (rt :: acc) pps ppx_rts
and loop acc = function
| [] -> Ok acc
| pp :: pps ->
pp.ppx_runtime_deps >>= fun rt_deps ->
check_runtime_deps acc pps rt_deps
in
deps >>= fun deps ->
pps >>= Result.List.concat_map ~f:(fun pp -> pp.ppx_runtime_deps)
>>| List.rev_append deps
>>= Result.List.map ~f:(check_private_deps ~loc ~allow_private_deps)
pps >>= fun pps ->
loop deps pps
in
(deps, pps)
in
(deps, pps, resolved_selects)
and closure_with_overlap_checks db ts ~stack =
and closure_with_overlap_checks db ts ~stack =
let visited = ref String.Map.empty in
let res = ref [] in
let orig_stack = stack in