Skip to content

Commit

Permalink
Support upcoming ppxlib (was "ppx_base") (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
xclerc authored and jeremiedimino committed Feb 27, 2018
1 parent ebce851 commit c324736
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/gen_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,11 @@ module Gen(P : Params) = struct
if List.exists deps ~f:(function
| "ppx_driver" | "ppx_type_conv" -> true
| _ -> false) then
pps @ [(Loc.none, Pp.of_string "ppx_driver.runner")]
pps @ [match Scope.name scope with
| Some "ppxlib" ->
Loc.none, Pp.of_string "ppxlib.runner"
| _ ->
Loc.none, Pp.of_string "ppx_driver.runner"]
else
pps
in
Expand Down
2 changes: 1 addition & 1 deletion src/super_context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ module PP = struct

let uses_ppx_driver ~pps =
match (List.last pps : (_ * Pp.t) option :> (_ * string) option) with
| Some (_, "ppx_driver.runner") -> true
| Some (_, ("ppx_driver.runner" | "ppxlib.runner")) -> true
| Some _ | None -> false

let promote_correction ~uses_ppx_driver fn build =
Expand Down

0 comments on commit c324736

Please sign in to comment.