Jeremie Dimino
ad9b82e92a
Compute the transitive closure of ppx runtime deps only when needed
...
We only need it when the kind is ppx_rewriter or ppx_deriver.
2018-01-24 18:12:50 +00:00
Rudi Grinberg
ab18b13a04
Fix META generation wrt scope
...
We should respect the scope of the current internal library to generate the META
2018-01-24 16:32:10 +08:00
Jérémie Dimino
ba5ffbc414
Fix meta generation for ppx runtime deps ( #441 )
...
Use the transitive closure for the deprecated ppx method
2018-01-23 16:03:59 +00:00
Rudi Grinberg
58f9e9840c
Replace janestreet/jbuilder with ocaml/dune
...
Update all links where necessary
2018-01-23 17:52:44 +08:00
David Allsopp
6873478307
Display a warning for bad jbuild-ignore lines ( #389 )
...
jbuild-ignore should only refer to directories in the current directory
(unlike .gitignore): referring to subdirectories doesn't work.
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2018-01-23 09:14:22 +00:00
Rudi Grinberg
a34f71f922
Merge pull request #410 from rgrinberg/new-odoc-minimal
...
New odoc rules (minimal)
2018-01-23 02:58:06 +08:00
Rudi Grinberg
6cce747141
Make odoc work with multiple libraries defined in the same dir
2018-01-23 02:56:23 +08:00
Thomas Refis
815c332dc5
odoc: handle .mld files
2018-01-23 02:56:23 +08:00
Jeremie Dimino
13843f93dd
Fix #436
2018-01-22 13:12:29 +00:00
David Allsopp
61b3e5f189
Use /Fo instead of -o when invoking CL
...
The -o option in the Microsoft C Compiler is deprecated (and has been for
a very long time). The warning is tedious, so use /Fo instead. The only
problem with this is that "-o foo.obj" must become "/Fofoo.obj" with no
space, which requires a little support in Arg_spec.
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2018-01-22 12:17:28 +00:00
Jérémie Dimino
f9837a278b
Detect recursive includes ( #435 )
...
Fix #432
2018-01-22 11:32:40 +00:00
David Allsopp
d2706b448b
Remove readonly attribute on Windows before unlink
...
The legacy DOS readonly attribute is a tedious difference on Windows,
because a user may have permission to delete a file, but unlink fails
because the attribute is set.
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2018-01-22 11:14:18 +00:00
Jeremie Dimino
b401284b84
Restore .merlin-exists trick
...
This is needed so that command don't depend on the contents of the .merlin
2018-01-19 22:54:05 +00:00
Jeremie Dimino
8b11b494d2
Fix Path.pp
2018-01-19 22:44:30 +00:00
Jeremie Dimino
92c7927432
Fix Path.explode
2018-01-19 22:43:40 +00:00
Jérémie Dimino
5651eb80b5
Better behavior when aliases have targets ( #426 )
...
Ignore the targets and report a warning.
2018-01-19 22:17:11 +00:00
Jeremie Dimino
92f9ce4edb
Fix the order of files in (diff file.ml file.ml.ppx-corrected)
...
The generated correction must come after for promotion to work.
2018-01-19 15:32:29 +00:00
Jérémie Dimino
9dd5ab74e4
[WIP] Load rules lazily ( #370 )
...
* 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.
2018-01-19 08:50:06 +00:00
Jérémie Dimino
b06aad431e
Replace promote actions by diff actions + promote command ( #421 )
...
* Remove (promote ...) and (promote-if ...)
* Remove `--promote ...`
* Add (diff ...) and (diff? ...)
* Add `jbuilder promote` and `--auto-promote`
* Fix #423
2018-01-18 11:32:20 +00:00
hhugo
9347d4a767
tailrec split_lines ( #416 )
2018-01-17 13:34:53 +00:00
Jérémie Dimino
314da72d3c
Better signature for Artifacts.file_of_lib ( #418 )
2018-01-16 13:40:04 +00:00
Jérémie Dimino
49edf8ed65
Accept correction files produced by ppx_driver ( #415 )
...
* 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
2018-01-16 12:28:02 +00:00
Jeremie Dimino
d4dec9b4f5
Change the default of --promote from check to copy
...
As said in the PR. I forgot to push the commit.
2018-01-15 14:55:17 +00:00
Jeremie Dimino
ce901a4731
Fix the build
2018-01-15 13:50:08 +00:00
Jérémie Dimino
af5d7f5e6f
Report better errors for globs pointing to non-existing directories ( #413 )
...
Fix #412
2018-01-15 13:28:32 +00:00
Jérémie Dimino
eab1ff6c7b
Add promote actions and include stanzas ( #402 )
...
Add a promote action that allows to copy over generated files as
source files and an include stanza allowing to include a file in a
jbuild file.
2018-01-15 13:24:25 +00:00
Christophe Troestler
f8617b5721
Let "concat" or "split" be a quality of the variable ( #336 )
...
* 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
2018-01-15 09:32:40 +00:00
Jérémie Dimino
d3410e0659
Refactor alias handling
...
* Improve documentation of alias module
* Add add_alias helper function to help create rules in alias
2018-01-13 19:51:24 +08:00
Jérémie Dimino
a1026f46d1
Add action helpers
...
Add constructor functions for Actions
2018-01-13 19:51:18 +08:00
Jérémie Dimino
e28344a24b
Do not use the transitive closure in generated META files ( #405 )
2018-01-12 16:41:23 +00:00
Rudi Grinberg
92d4cbb7be
Merge pull request #404 from janestreet/make-lint-standard
...
Make lint alias standard
2018-01-12 15:46:26 +08:00
Rudi Grinberg
6bd46a76f8
Make lint alias standard
2018-01-11 16:20:19 +08:00
Rudi Grinberg
3776acd8d2
Fix c_compiler parsing for OCaml >= 4.06.0 ( #393 )
2018-01-10 16:54:25 +00:00
Rudi Grinberg
ca1c8dd897
Add -null option to linters
...
Since the omp driver doesn't support this option yet, we must add it
conditionally. This is a temporary workaround.
2018-01-10 22:45:50 +08:00
Rudi Grinberg
1fc0ef0ab1
Add lint rules
2018-01-10 22:45:50 +08:00
Rudi Grinberg
6d2152e7b1
Add Alias.add_{stamp,action}_dep
...
These functions will be useful to construct alias elsewhere
2018-01-10 22:45:50 +08:00
Rudi Grinberg
bfbfc0bf30
Change lint option to be the same as preprocessing
2018-01-10 22:45:50 +08:00
Rudi Grinberg
66fc8db600
add lint alias
2018-01-10 22:45:49 +08:00
Rudi Grinberg
897c1e2e5e
Add helper functions
...
* Path.Set.sexp_of_t
* Module.iter
* List.last
2018-01-10 22:45:31 +08:00
Jeremie Dimino
469079f9c6
Connect usexp errors to the error reporter
...
Fix #384
2018-01-09 09:55:01 +00:00
Rudi Grinberg
1ff8a7989c
Cross compilation support
...
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
2018-01-01 22:34:41 +08:00
Jeremie Dimino
6e64156913
Add target support
...
* Create targets from findlib toolchains by reading findlib configs
* Define targets inside workspace files
* Set cross compilation targets with -x argument
2018-01-01 22:34:41 +08:00
Jeremie Dimino
afb602d7ef
Add add_install_prefix function
...
To control installation prefix
2018-01-01 21:48:25 +08:00
Jeremie Dimino
86dc606fef
Add Utils.install_file
...
Determines the .install depending on the toolchain for x compilation
2018-01-01 21:48:25 +08:00
Jeremie Dimino
5d451e7034
Add cstr_record
2018-01-01 21:48:25 +08:00
Jeremie Dimino
e06c060121
Add module to parse findlib config
...
Necessary to read toolchains
2018-01-01 21:48:25 +08:00
Rudi Grinberg
1a8c328b2d
Make is_directory work when dir doesn't exist
2018-01-01 21:48:25 +08:00
Rudi Grinberg
829b85ec44
Add Path.drop_prefix
2018-01-01 21:48:25 +08:00
François Bobot
9ec6b22066
Merge pull request #379 from janestreet/usexp
...
Replace the S-expression Parser by Usexp
2017-12-22 14:56:22 +01:00
David Allsopp
9d3c0b649c
Fix copy# for Microsoft C compiler
...
Microsoft CL doesn't support #n and requires the more strictly correct
directive #line
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2017-12-22 08:16:09 +01:00