* Change jbuilder to load rules lazily
Rules are now loaded on a per directory basis as needed. This speed up
the start up time on large workspaces.
Does various refactoring as well.
* Simplify the handling of META files
We no longer generate a META.foo.from-jbuilder file. Nobody is using
this feature and it's making the new code more complicated.
* Accept correction files produced by ppx_driver so that [@@deriving_inline] works
* Change promote-if so that it doesn't promote the file when the source file doesn't exist in the source tree
* Let variables say whether they are Concat or Split
To concatenate the contents of a split variable, put it in a string:
"${var} ".
Fixes#300
See also https://github.com/janestreet/jbuilder/issues/408
* Issue a deprecation warning for ${!...}
* Treat ${CC}, ${<}, ${^} and ${read-lines:...} as split vars
* Change ${!^} into ${^} for this project jbuild rules
In a host/target setup, all binaries that are built (including preprocessors)
are ran using the host *for* building targets. Final target artifacts are
compiled using the target toolchain
Make jbuilder rules work even when binaries are missing
* Proper error messages for missing binaries
* Unify Prog_spec and Maybe_prog
both can simply be unified into a path type that has a hint for the error
* Remove scarcely useful in_the_tree parameter
It's always true except for the C compiler. In which case, there's no harm in
making it true.
* Make Artifacts return Action.Prog
The old return value was simply converted to this anyway. It's simpler to just
return the proper error straight up.
* Remove remains of in_the_tree
Add (copy_files <glob>) and (copy_files# <glob>) stanzas. These
stanzas setup rules for copying files from a sub-directory to the
current directory.
This provides a reasonable way to support multi-directory
library/executables in jbuilder.
For instance (chdir ${read:foo} ...) is not allowed. This doesn't seem
really useful since we couldn't express the targets anyway and
supporting it complicate the code.
- ${read:<filename>} -> expand to the contents of the file
- ${read-lines:<filename>} -> expand to the list of lines in the file
- ${read-strings:<filename> -> expand to the list of lines in the file,
unescaped using OCaml escaping rules
Generalize ${!...} form
Makes the output quieter by default and add a `--verbose` argument. Print a message when waiting for background jobs to finish only it it takes more than 0.5 seconds.