Add support for upcoming ppx_base. (#541)

This commit is contained in:
Xavier Clerc 2018-02-22 20:38:27 +00:00 committed by Jérémie Dimino
parent 6235cb6b99
commit 032cb62af6
2 changed files with 6 additions and 2 deletions

View File

@ -1012,7 +1012,11 @@ module Gen(P : Params) = struct
if List.exists deps ~f:(function
| "ppx_driver" | "ppx_type_conv" -> true
| _ -> false) then
pps @ [Pp.of_string "ppx_driver.runner"]
pps @ [match Scope.name scope with
| Some "ppx_base" ->
Pp.of_string "ppx_base.runner"
| _ ->
Pp.of_string "ppx_driver.runner"]
else
pps
in

View File

@ -950,7 +950,7 @@ module PP = struct
let uses_ppx_driver ~pps =
match Option.map ~f:Pp.to_string (List.last pps) with
| Some "ppx_driver.runner" -> true
| Some ("ppx_driver.runner" | "ppx_base.runner") -> true
| Some _ | None -> false
let promote_correction ~uses_ppx_driver fn build =