Skip to content

Commit

Permalink
Revert "Use Toploop.add_directive (#4834)"
Browse files Browse the repository at this point in the history
This reverts commit 3f08057.

Signed-off-by: nojebar <[email protected]>
  • Loading branch information
nojb authored and ejgallego committed Jan 26, 2022
1 parent ee27573 commit eb7e8ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
15 changes: 6 additions & 9 deletions plugin/jbuild_plugin.ml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
let () =
let open Toploop in
let add_directive name desc =
add_directive name desc { section = ""; doc = "" }
in
add_directive "require" (Directive_string ignore);
add_directive "use"
(Directive_string
Hashtbl.add Toploop.directive_table "require"
(Toploop.Directive_string ignore);
Hashtbl.add Toploop.directive_table "use"
(Toploop.Directive_string
(fun _ ->
failwith "#use is not allowed inside a dune file in OCaml syntax"));
add_directive "use_mod"
(Directive_string
Hashtbl.add Toploop.directive_table "use_mod"
(Toploop.Directive_string
(fun _ ->
failwith "#use is not allowed inside a dune file in OCaml syntax"))

Expand Down
15 changes: 6 additions & 9 deletions src/dune_rules/assets.ml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
let jbuild_plugin_ml = {jbp|
let () =
let open Toploop in
let add_directive name desc =
add_directive name desc { section = ""; doc = "" }
in
add_directive "require" (Directive_string ignore);
add_directive "use"
(Directive_string
Hashtbl.add Toploop.directive_table "require"
(Toploop.Directive_string ignore);
Hashtbl.add Toploop.directive_table "use"
(Toploop.Directive_string
(fun _ ->
failwith "#use is not allowed inside a dune file in OCaml syntax"));
add_directive "use_mod"
(Directive_string
Hashtbl.add Toploop.directive_table "use_mod"
(Toploop.Directive_string
(fun _ ->
failwith "#use is not allowed inside a dune file in OCaml syntax"))

Expand Down

0 comments on commit eb7e8ee

Please sign in to comment.