Help users to not use non-future proof features in jbuild files
This commit is contained in:
parent
c2f04a4963
commit
eb7b5e2be4
|
@ -1001,3 +1001,5 @@ syntax is not enough. It is not clear whether the OCaml syntax will be
|
|||
supported in the long term as it doesn't work well with incremental
|
||||
builds. It is possible that it will be replaced by just an ``include``
|
||||
stanza where one can include a generated file.
|
||||
|
||||
Consequently **you must not** build complex systems based on it.
|
||||
|
|
|
@ -55,7 +55,13 @@ module Jbuilds = struct
|
|||
let plugin_contents = Io.read_file plugin in
|
||||
Io.with_file_out (Path.to_string wrapper) ~f:(fun oc ->
|
||||
Printf.fprintf oc {|
|
||||
let () = Hashtbl.add Toploop.directive_table "require" (Toploop.Directive_string ignore)
|
||||
let () =
|
||||
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 jbuild in OCaml syntax"));
|
||||
Hashtbl.add Toploop.directive_table "use_mod" (Toploop.Directive_string (fun _ ->
|
||||
failwith "#use is not allowed inside jbuild in OCaml syntax"))
|
||||
|
||||
module Jbuild_plugin = struct
|
||||
module V1 = struct
|
||||
let context = %S
|
||||
|
|
Loading…
Reference in New Issue