Add a warning for with_lib_deps

I just spent an hour debugging a stupid bug caused by this...

Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
This commit is contained in:
Jeremie Dimino 2018-06-02 17:55:17 +01:00 committed by Jérémie Dimino
parent b5dfb826ef
commit adcf44942f
1 changed files with 7 additions and 1 deletions

View File

@ -159,7 +159,13 @@ val resolve_program
module Libs : sig
(** Make sure all rules produces by [f] record the library
dependencies for [jbuilder external-lib-deps] and depend on the
generation of the .merlin file. *)
generation of the .merlin file.
/!\ WARNING /!\: make sure the last function call inside [f] is
fully applied, otherwise the function might end up being executed
after this function has returned. Consider addin a type
annotation to make sure this doesn't happen by mistake.
*)
val with_lib_deps
: t
-> Lib.Compile.t