Jeremie Dimino
473b8d11ed
Update test for #485
2018-02-13 15:52:18 +00:00
Jérémie Dimino
dc3bfb9b05
Add a test for #485 ( #511 )
2018-02-13 12:58:34 +00:00
Jérémie Dimino
2fb65c05ba
Fix #330 ( #510 )
2018-02-13 12:49:50 +00:00
Jérémie Dimino
1e6ee05ecc
Added tests for byte-code only architectures ( #509 )
2018-02-13 12:46:07 +00:00
Rudi Grinberg
8781c81bd3
Fix the top closure for internal libs
...
keying by the private name isn't enough. We include the dir in the key, because
private names are unique per dir.
2018-02-12 19:55:39 +08:00
Rudi Grinberg
ee42ca5301
Add test showing that private libs with same names don't get built
...
2 private libs with equivalent names but living in public names will not be
built as part of @install even if they have different public names
2018-02-12 19:55:39 +08:00
Hugo Heuzard
dad2458879
install all sources
2018-02-08 23:09:55 +08:00
Rudi Grinberg
4ed4cad3e5
Witness failure to install .ml source when .mli is present
2018-02-08 23:08:52 +08:00
Jérémie Dimino
b3838284c6
Better support for mli/rei only modules ( #489 )
2018-02-08 10:12:46 +00:00
Jérémie Dimino
763feda683
Move the addition of <lib>.a dependencies to Lib.archive_files ( #493 )
...
Move the addition of <lib>.a dependencies to Lib.archive_files
And refactor a bit the code
2018-02-08 03:21:11 +08:00
Jeremie Dimino
b46cef533a
Make Findlib.package abstract
2018-02-07 18:10:05 +00:00
Jeremie Dimino
1588ce90f2
Update js_of_ocaml tests
2018-02-07 14:20:56 +00:00
Jeremie Dimino
b17b476048
Set the obj_dir for executables
2018-02-07 12:34:01 +00:00
Grégoire Henry
fda3c7f680
Implement #427
2018-02-07 12:33:52 +00:00
Jérémie Dimino
0570e09f9a
Add a configuration file and a quiet mode ( #490 )
2018-02-07 11:38:21 +00:00
Jérémie Dimino
4e4f651b37
Don't stop on the first error ( #477 )
...
Before, jbuilder used to stop its execution after an error was
encountered. Now it continues until all branches have been explored.
To implement this feature, Future was rewritten as a Fiber module with
a simpler semantic.
This patch contains various other refactorings.
2018-02-06 14:39:03 +00:00
Jérémie Dimino
80c0bfc879
Split calls to ocamldep ( #486 )
...
Instead of doing a single call to ocamldep, do one per file. This is
needed to support "menhir --infer".
This should also make compilation go further when there are files with
syntax errors.
2018-02-06 11:48:04 +00:00
Jérémie Dimino
f618096d6e
Add a test for dependency cycles ( #475 )
2018-02-01 13:05:32 +00:00
Rudi Grinberg
e61142e885
Merge pull request #460 from ocaml/fix-promote-tests-on-osx
...
Fix bad interaction between promotion and incremental builds on OSX
2018-02-01 20:15:18 +08:00
Jeremie Dimino
b9c4dd2339
Remove files from the digest cache when promoting them.
...
This is to avoid problems with incremental compilation on OSX.
Fix #456
2018-02-01 08:23:25 +00:00
Rudi Grinberg
3646e554a9
Add tests of js_of_ocaml flag
...
Make sure that adding js runtime files reflects correctly in the META and
.install files
2018-02-01 04:31:18 +08:00
Rudi Grinberg
721c80273a
Update ppx scope tests
2018-01-31 00:48:58 +08:00
Rudi Grinberg
672120b3b8
Introduce explicit scopes for Lib_db
...
This commit introduces explicit scopes in Lib_db and refactors dune to use these
scopes where appropriate. Briefly, they are appropriate whenever we previously
used a directory to resolve the scope with Lib_db.find ~dir and friends. So a
Lib_db.Scope.t replaces a (dir, Lib_db.t) pair.
This allows to be explicit about the anonymous and external scope. Which is
important when building ppx drivers.
We also harmonize the error handling with the Findlib module. In both cases
we use a flat string list of errors. Rather than the more specific type we had
before in Findlib.
2018-01-30 19:21:40 +08:00
Jérémie Dimino
c066efd196
Add the transitive dependencies of used ppx rewriters ( #450 )
2018-01-25 11:22:50 +00:00
Rudi Grinberg
eac036a446
Add another test case for meta generation ( #449 )
...
A library that has been pp'd with a preprocessor that has runtime deps
2018-01-25 10:21:37 +00:00
Rudi Grinberg
2eb45c4ae3
Test case to reproduce scope bug when building ppx
...
The scope selected when building the ppx is bogus (it corresponds to the
directory with the ppx exe).
2018-01-25 12:20:00 +08:00
Rudi Grinberg
fde877838b
Merge pull request #444 from rgrinberg/reproduce-scope-bug
...
META generation bug in different scopes
2018-01-24 19:32:12 +08: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
Rudi Grinberg
d6601bf2bb
META generation bug in different scopes
2018-01-24 16:09:38 +08:00
Rudi Grinberg
3b3f8afb4d
Improve odoc tests to use mld file
2018-01-24 00:05:52 +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
a34f71f922
Merge pull request #410 from rgrinberg/new-odoc-minimal
...
New odoc rules (minimal)
2018-01-23 02:58:06 +08:00
Rudi Grinberg
d2af91091c
Update odoc tests
...
These now work for libs defined in the same dir
2018-01-23 02:56:23 +08:00
Jérémie Dimino
f9837a278b
Detect recursive includes ( #435 )
...
Fix #432
2018-01-22 11:32:40 +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
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
Rudi Grinberg
326ca5413a
Merge pull request #422 from rgrinberg/skip-reason-tests
...
Disable reason tests for now
2018-01-18 21:12:19 +08: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
Rudi Grinberg
ec5fac8085
Disable reason tests for now
...
Current version of reason doesn't install on travis
2018-01-18 06:20:33 +08: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
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
e28344a24b
Do not use the transitive closure in generated META files ( #405 )
2018-01-12 16:41:23 +00:00
Rudi Grinberg
f490540538
Update tests for linting
2018-01-10 22:45:50 +08:00
Rudi Grinberg
5dd8d028ae
Improve reason tests
...
* Test that modules are actually built by running their code.
* Make reasonlypp to also be a linter
* Make the reason only pp double as linter When ran with the -lint flag
2018-01-10 02:15:17 +08:00
Jeremie Dimino
f68c1dd042
Add blackbox test for cross compilation
2018-01-01 22:34:41 +08:00
Rudi Grinberg
6422cd606d
Add test for sub library in sub dir
...
Makes sure that that directory option is used appropriately in the META
2017-12-28 16:03:44 +08:00
Rudi Grinberg
dfe0001b5a
Simple stubs test
...
C stub library and executable that will run it
2017-12-23 11:29:41 +08:00
Rudi Grinberg
7d8ca23b62
Test install_c_headers stanza
2017-12-23 11:25:05 +08:00
Rudi Grinberg
5e890ccd67
Merge pull request #382 from rgrinberg/no-empty-modules
...
Add dummy module to make copy_files test pass on 4.02.3
2017-12-23 11:03:53 +08:00
Rudi Grinberg
7363c772aa
Add dummy module to make copy_files test pass on 4.02.3
2017-12-22 21:18:17 +08:00
Rudi Grinberg
a3806d7e3b
Add utop tests
2017-12-22 19:31:25 +08:00
Rudi Grinberg
f365e8f157
Improve copy_files test for c files to make sure source is tracked
2017-12-22 08:16:09 +01:00
David Allsopp
5901d7dee3
Update copy_files blackbox test to include C
...
Tests that the the directive emits #line instead of #n.
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2017-12-22 08:16:09 +01:00
Rudi Grinberg
2025f1db58
Improve reason tests
...
Test that modules are actually built by running their code.
2017-12-21 20:20:43 +08:00
Rudi Grinberg
3ac73edb42
move copy-sources for reason tests to own dir
...
So that the originals aren't used accidentally
2017-12-20 17:23:26 +07:00
Rudi Grinberg
bbb6108924
Fix Path.descendent
...
It was broken for local paths with equal length
2017-12-20 09:06:12 +00:00
Rudi Grinberg
9e4390ddc4
Add tests Path.descendent
...
Some of them are failing because it it doesn't work when the paths are equal or
have the same length
2017-12-20 09:06:12 +00:00
Rudi Grinberg
347c3d7612
disable ppx_runner test with custom omp runner args
2017-12-19 19:05:37 +07:00
Rudi Grinberg
1793827d0b
Tests for running ppx rewriters
...
Testing changing and interacting with drivers by passing arguments.
2017-12-19 19:00:50 +07:00
Rudi Grinberg
3cae475486
Add some reason tests wrt to ppx preprocessing ( #375 )
...
Add some reason tests wrt to ppx preprocessing
2017-12-19 19:49:06 +08:00
Rudi Grinberg
2f8d95cdeb
Merge pull request #373 from rgrinberg/reason-preprocess-fix
...
Reason preprocess fix
2017-12-18 23:25:10 +08:00
Jeremie Dimino
d661f74c46
Skip 4.02.3 for the multiple-private-libs test
2017-12-18 13:30:49 +00:00
Jeremie Dimino
18d8cb847d
Fix the test added in the previous commit
2017-12-18 13:30:49 +00:00
Jeremie Dimino
f534387ef6
Add a test exposing a name clash
...
When several private libraries have the same name, jbuilder crashes.
2017-12-18 13:30:49 +00:00
Rudi Grinberg
4570020ce7
Fix reason preprocessing
...
and previously failed test
2017-12-18 20:52:52 +08:00
Rudi Grinberg
91e96316b2
Add failing reason for reason preprocessing
2017-12-18 20:51:16 +08:00
Rudi Grinberg
b7dd41fc6e
Add blackbox test for select construct ( #363 )
2017-12-13 14:34:35 +08:00
Rudi Grinberg
058643608c
Jbuilder exec rebuilt if possible option ( #345 )
...
Make jbuilder exec build its target
Jbuilder will now attempt to rebuild the target before executing it. This option can be turned off by passing in --no-build
2017-12-11 18:23:07 +08:00
Rudi Grinberg
d53f26c841
Add odoc generation tests
2017-12-11 14:08:06 +08:00
Rudi Grinberg
451a6d34af
Add support for conditional execution to cram
...
We'd like the ability to skip tests on certain versions of OCaml that don't
support what is being tested.
2017-12-11 14:07:09 +08:00
Rudi Grinberg
0863c1d941
Reason black box tests
...
Test the following scenarios:
* reason source, reason interface
* reason source, ocaml interface
* ocaml source, reason interface
* preprocessed reason sources
* rei files are included in the .install file
2017-12-10 23:25:21 +08:00
Rudi Grinberg
5647ae83b0
black box tests for .install file generation
2017-12-05 20:37:46 +08:00
Rudi Grinberg
c815ea6f20
Simple test for the ocaml syntax for jbuild files
2017-12-03 20:29:44 +08:00
Rudi Grinberg
9983b3e7bd
Add tests for meta generation ( #344 )
...
Try to test as many aspects as possible: dependencies, synopsis, ppx, etc.
2017-11-29 16:22:37 +08:00
Rudi Grinberg
785beeafac
Add option to force running tests ( #320 )
...
Option to force running tests
The mechanism allows for forcing any alias, but only forcing tests is exposed to the user. Aliases are forced by deleting all the alias files that belong to a particular alias. The option for forcing tests is called --force.
2017-11-28 19:03:22 +08:00
Rudi Grinberg
02a4c59654
Remove mention of recursive aliases from error message
...
all aliases are non recursive
2017-10-19 08:17:34 +08:00
Rudi Grinberg
192f6681e0
Fix jsoo cram tests
...
The order of some commands changed. However, the same commands are still being
executed.
2017-10-16 10:38:40 +08:00
Jeremie Dimino
63e8a76006
Add tests for aliases
2017-10-14 10:37:36 +08:00
Jeremie Dimino
a47e3ab78a
Fix cram tests
2017-09-29 17:22:15 +01:00
Jeremie Dimino
5de73ca740
Add support for locks in rules
...
This is to allow users define more complicated tests without having
to resort to -j1.
2017-09-29 12:20:08 +01:00
Jeremie Dimino
30076e7d79
Fix #264
2017-09-29 12:01:47 +01:00
Jeremie Dimino
50cbbe2ac5
Add ${path-no-dep:...}
...
To be able to resolve path names that are not dependencies.
2017-09-29 11:55:23 +01:00
Jeremie Dimino
726e738bb6
Expose bug described in #264
2017-09-29 11:28:36 +01:00
Jeremie Dimino
c71acbd930
Make the testsuite pass on Windows
...
Thought it still requires `sh` and a few Unix tools
2017-09-22 01:59:40 +01:00
François Bobot
cecf0a2aaf
Add (copy_files <glob>) stanza ( #35 )
...
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.
2017-09-10 02:31:07 +01:00
Jeremie Dimino
d55c807d51
Allow to localize the error reported by Path.relative/of_string
...
Since these are often used to parse user input.
2017-09-10 01:26:06 +01:00
Jeremie Dimino
e1114d18df
Reorganize tests
...
Switch blackbox tests to cram testing.
2017-08-11 11:36:33 +01:00
Jeremie Dimino
4b40cad247
Revert public_interfaces for now
...
The code to support it is starting to become increasingly complicated
and the number of problem found is a bit alarming.
We'll reinclude it later after a bit more testing and hopefully some
simplifications.
2017-07-21 17:32:39 +01:00
François Bobot
a3933a2c18
Add public_interfaces selection for libraries ( #106 )
...
Add a field "public_interfaces" to library stanza listing which modules are public.
Private modules won't be accessible outside the scope where the library is defined.
2017-07-19 15:26:48 +01:00
Jeremie Dimino
daeb40b087
Add SCOPE_ROOT
...
While analysing packages using jbuilder, I found that some packages
use ${ROOT} to refer to the root of the project. However, this doesn't
work as ${ROOT} depends on the workspace configuration.
Add ${SCOPE_ROOT} to make this easier for projects with a lot of
nested sub-directories.
2017-06-09 12:45:05 +01:00
Jeremie Dimino
6b07ee2e3c
Fix build of tests with --dev
2017-06-09 12:45:05 +01:00
Jeremie Dimino
3983d669db
Add a test for inferred rules
2017-06-08 18:46:25 +01:00
Jeremie Dimino
745e58039b
Fix expect tests
2017-05-31 10:25:19 +01:00
Jeremie Dimino
92f0b7daaa
Fix test
2017-05-31 10:20:33 +01:00
Jeremie Dimino
116769724f
Allow to use ${^} in actions in conjunction with (glob_files ...) and (file_recursively_in ...)
2017-05-29 18:53:54 +01:00
Jérémie Dimino
7c9dcbf284
Added deps/targets inference
2017-05-29 07:51:52 +01:00
Jeremie Dimino
60d09f7e27
Print background process failures when exiting
2017-05-26 17:30:34 +01:00
hhugo
86a4f0324a
Add js_of_ocaml support ( #60 )
...
Add rules for building .js files from .bc files using js_of_ocaml as well as rules for separate js compilation when --dev is passed.
2017-05-02 11:25:37 +01:00
Jeremie Dimino
07871b1190
Add support for ${lib-available:<name>} forms
2017-04-17 12:48:54 +01:00
Rudi Grinberg
3e3d92c9e5
Add menhir support ( #42 )
...
Adds the menhir stanza which desugars into a Rule.t with Support for:
* ocamlyacc like use
* modular parsers with --base
* passing extra flags
Also add tests and documentation.
2017-04-03 16:25:43 +01:00
Jeremie Dimino
047139a2d7
Added tests for Map.of_alist_multi
2017-03-31 13:50:36 +01:00
Jeremie Dimino
99b0d94335
Fixed the implementation of Filename.{split_,}ext
2017-03-31 13:34:30 +01:00
Stephen Dolan
b5ae1b1f52
Quieter output ( #40 )
...
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.
2017-03-30 17:36:58 +01:00
Jeremie Dimino
d5b5322f12
Fix a bug in the interpretation of META files
...
Before this commit, when there was more than one applicable
assignment, the one with the lowest number of formal predicates was
selected instead of the one with the biggest number of formal predicates
2017-03-29 17:47:17 +01:00
Jeremie Dimino
16233d1ebe
Added tests for the findlib subsystem
2017-03-29 17:39:17 +01:00
Jeremie Dimino
462db5d748
Run jbuilder with -j1 in tests
2017-03-15 16:28:20 +00:00
Jeremie Dimino
a5e01841db
add missing file
2017-03-15 15:47:21 +00:00
Jeremie Dimino
6d1bb607c9
Fix #25
2017-03-15 15:44:27 +00:00
Jeremie Dimino
f95390ef0a
Added a test case for #25
2017-03-15 15:16:55 +00:00
Jeremie Dimino
34a8951292
Improve dependency path printing
2017-03-15 11:49:31 +00:00
Jeremie Dimino
20cbf2db69
Add test files for previous commit
2017-03-15 11:28:33 +00:00
Jeremie Dimino
85607929d1
Add test case for #24
2017-03-15 11:17:09 +00:00
Jeremie Dimino
bf4a4ba5f9
Add a regression test for #20
2017-03-15 11:13:49 +00:00
Jeremie Dimino
d8fd2f084c
re-arrange tests
2017-03-15 11:08:54 +00:00
Jérémie Dimino
ba08f27678
Add a few more redirections
...
- with-{stdout,stderr,outputs}-to
- ignore-{stdout,stderr,outputs}
- variable ${null} for /dev/null or NUL on Win32
2017-03-13 08:10:59 +00:00