Commit Graph

1683 Commits

Author SHA1 Message Date
Jeremie Dimino 39e74826f4 Simplify the parser
Replace the current generated parser by an ocamllex lexer + a simple
parser.

The new code is:
- much simpler and smaller
- shouldn't cause ocamlopt to stack overflow anymore on BSD systems
- slightly slower but not that much

Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-01 08:42:45 +01:00
Rudi Grinberg 115ee93dd6
Merge pull request #829 from rgrinberg/little-cleanups
Little cleanups
2018-06-01 02:39:20 +07:00
Rudi Grinberg 2e86529ece
Merge branch 'master' into little-cleanups 2018-06-01 02:37:09 +07:00
Rudi Grinberg 5d0119b744
Merge pull request #827 from rgrinberg/sexpable
Move sexpable signature to Stdune.Sexp
2018-06-01 02:36:43 +07:00
Rudi Grinberg f07dff5696
Merge branch 'master' into sexpable 2018-06-01 02:33:54 +07:00
Rudi Grinberg f9a215921b Wait for deps and sdeps at once
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-01 01:28:14 +07:00
Etienne Millon e97d0c5ad6 Rename Path.readdir to Path.readdir_unsorted (#828)
As `Sys.readdir`, it returns entries in an nondeterministic order.
This can cause problems if caller relies on the list being sorted.

See #820.

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-05-31 14:52:10 +01:00
Rudi Grinberg 5bfacf766a Move sexpable signature to Stdune.Sexp
Also tweak Syntax.Version to match this signature

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-31 13:17:52 +07:00
Rudi Grinberg 8fea39b09b
Merge pull request #825 from rgrinberg/add-classical-ppx-test
Add test for classical ppx
2018-05-31 10:46:35 +07:00
Rudi Grinberg b057c40668
Merge branch 'master' into add-classical-ppx-test 2018-05-31 10:43:22 +07:00
Rudi Grinberg 3974ac3fa8
Merge pull request #824 from rgrinberg/merlin-fix
Merlin fix
2018-05-30 21:52:23 +07:00
Rudi Grinberg 03c5ffb805
Merge branch 'master' into merlin-fix 2018-05-30 21:51:58 +07:00
Etienne Millon 29f711985d Make "path already scanned" message deterministic (#820)
When a symlink loop is detected, the following message is printed:

> Path X has already been scanned. Cannot scan it again through symlink Y

However, the actual symlink that is displayed depends on the order in
with `readdir` outputs the contents (which depends on FS internals).

This sorts the directory list so that the message is deterministic.

It can be tested by adding for example a `List.rev` call after
`Path.readdir`: the affected version will return a different version in
the `github764` test.

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-05-30 12:57:23 +01:00
Jérémie Dimino 171c22614d
Use Marshal for the incremental and digest databases (#817)
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-05-30 11:54:04 +01:00
Rudi Grinberg 0677c2d79c Add test for using a dune library with ocamlfind
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-30 15:39:58 +07:00
Rudi Grinberg 939341af16 Add test for classical ppx
Test that generated META can be used by ocamlfind

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-30 14:59:37 +07:00
Rudi Grinberg 0d3bdf34fc Small cleanup of merlin generation
Use the the known src/obj dirs as the initial value for accumulation

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-30 14:41:56 +07:00
Rudi Grinberg 8f16afe293 Fix merlin generation
The optional build contexts were being dropped from the obj dirs instead of the
source dirs.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-30 14:39:47 +07:00
Rudi Grinberg 62edd42d8a
Merge pull request #821 from emillon/doc-jbuilder-utop-args
Add an example for jbuilder utop
2018-05-30 02:12:52 +07:00
Etienne Millon 98b3e07efa Add an example for jbuilder utop
This clarifies the use case. This replaces the emacs flag with something
more likely to be used in a shell session: implicit bindings.

Closes #727

Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-05-29 13:24:24 +02:00
Rudi Grinberg 0cdf57e47b
Merge pull request #818 from rgrinberg/glob-optimize
Change Paths_glob to return a set of paths
2018-05-29 02:58:03 +07:00
Rudi Grinberg 85e4b13780 Change Paths_glob to return a set of paths
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-29 02:24:52 +07:00
Jérémie Dimino 1860438605
Add a jbuilder transition package (#796)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 18:19:30 +01:00
Jeremie Dimino d2b66279f6 Use Sys.{win32,cygwin} rather than Sys.os_type
The former functions are optimized away while the latter isn't.

Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-05-28 17:02:51 +01:00
Jeremie Dimino 547998d6c6 Fix an issue when a file is part of several packages
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-05-28 13:47:55 +01:00
Rudi Grinberg c5c4b164b7
Merge pull request #813 from rgrinberg/no-interning
Add No_interning module for easy experimentation
2018-05-28 19:19:00 +07:00
Rudi Grinberg 2b7ee377af
Merge branch 'master' into no-interning 2018-05-28 19:18:21 +07:00
Rudi Grinberg 73889e4451
Merge pull request #815 from rgrinberg/remove-path-set-conversion
Remove an extra conversion in rules_for_files
2018-05-28 18:38:16 +07:00
Rudi Grinberg 665c251678
Merge branch 'master' into remove-path-set-conversion 2018-05-28 18:38:04 +07:00
Rudi Grinberg 4a0e5a76af Remove more Path <-> List conversion in rules_for_files
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-28 18:04:48 +07:00
Rudi Grinberg 836b27ae2b Remove an extra conversion in rules_for_files
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-28 17:52:05 +07:00
Rudi Grinberg 1ce3dbe401
Merge pull request #809 from rgrinberg/explode-path
Explode path fixes
2018-05-28 17:07:48 +07:00
Rudi Grinberg da8064893c Add No_interning module for easy experimentation
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-28 14:51:37 +07:00
Rudi Grinberg 2bb9895817 Make explode_path work in 1 pass
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-28 14:38:35 +07:00
Rudi Grinberg da469e66f0 Fix explode_path to work on absolute paths
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-28 14:36:40 +07:00
Rudi Grinberg 270e1ce846
Merge pull request #810 from rgrinberg/suffix-prefix-fast
Check suffix and prefix without allocation
2018-05-28 14:34:33 +07:00
Rudi Grinberg 7b824febf3
Merge branch 'master' into suffix-prefix-fast 2018-05-28 14:30:53 +07:00
Rudi Grinberg fe9e6fb8c9
Make Interned generative again (#808)
I accidentally removed this in the last PR. I think it should probably be brought back.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-28 14:18:10 +07:00
Rudi Grinberg 6f3467ad96
Merge branch 'master' into suffix-prefix-fast 2018-05-28 14:16:13 +07:00
Jeremie Dimino b31d281949 Add Module_compilation.ocamlc_i
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino 3bd9addeb2 Use Compilation_context in menhir
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino c9ead23c7d Add Compilation_context
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino 69af40dced Compute includes outside of build_modules
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino 634cd25b1b Allow to compute the deps of an auxiliary module
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino cc7bd5ebb1 Allow modules to be only preprocessed and not linted
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino ac1c407cab Split Preproressing.pp_and... in two functions
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino 5c4027aff8 Re-work the code to handle (include ...)
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-05-28 07:59:05 +01:00
Jeremie Dimino d211272d24 Ignore jbuild_version stanzas
These are no longer necessary as they are super-seeded by (lang
...) stanzas in dune-project files

Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-05-28 07:59:05 +01:00
Jeremie Dimino cb6baa6c96 Make Stanza.t an open type
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-05-28 07:59:05 +01:00
Rudi Grinberg 89b0e397f7 Check suffix and prefix without allocation
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-27 01:23:55 +07:00