Remove the global ppx_drivers variable in super_context.ml

Fix #100
This commit is contained in:
Jeremie Dimino 2017-05-26 14:25:51 +01:00
parent 1de95b9d81
commit 9f9660b91a
1 changed files with 2 additions and 4 deletions

View File

@ -596,8 +596,6 @@ module PP = struct
; intf
}
let ppx_drivers = Hashtbl.create 32
let migrate_driver_main = "ocaml-migrate-parsetree.driver-main"
let build_ppx_driver sctx ~dir ~dep_kind ~target pp_names ~driver =
@ -677,13 +675,13 @@ module PP = struct
| [] -> "+none+"
| _ -> String.concat names ~sep:"+"
in
match Hashtbl.find ppx_drivers key with
match Hashtbl.find sctx.ppx_drivers key with
| Some x -> x
| None ->
let ppx_dir = Path.relative sctx.ppx_dir key in
let exe = Path.relative ppx_dir "ppx.exe" in
build_ppx_driver sctx names ~dir ~dep_kind ~target:exe ~driver;
Hashtbl.add ppx_drivers ~key ~data:exe;
Hashtbl.add sctx.ppx_drivers ~key ~data:exe;
exe
let target_var = String_with_vars.of_string "${@}" ~loc:Loc.none