Rudi Grinberg
3667db05fc
Move module validation to own function
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-03 11:48:32 +03:00
Rudi Grinberg
51ca4f7659
Simplify returning modules in Dir_contents.eval
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-03 11:42:30 +03:00
Rudi Grinberg
1597b61df9
Move 4.03 minium version check for opaque to top level
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 15:30:35 +02:00
Rudi Grinberg
bde4943692
Make file_deps and file_deps_with_exts share code
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 15:26:45 +02:00
Rudi Grinberg
9f43a88950
Remove opaque from Lib.t
...
Only use Compilation_context.t for controlling this
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 15:26:45 +02:00
Rudi Grinberg
e09bbfcd6e
Fix opaque calculation for includes
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 15:26:45 +02:00
Rudi Grinberg
b394896c1f
Make opaque information available to compilation context
...
Subsequently, use it as a flag when calculating rules and includes
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 15:26:45 +02:00
Rudi Grinberg
8a03e7099a
Hard code opaque mode
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 13:13:39 +02:00
Jérémie Dimino
b05e28569e
Add support for staged ppx rewriters such as ones using the typer ( #1080 )
...
Fix #193
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-02 12:11:59 +01:00
Louis Roché
a5d0941b14
replace jbuilder with dune
...
* when printing context
* in meta comments
* error messages
Signed-off-by: Louis Roché <louis@louisroche.net>
2018-08-02 12:41:35 +02:00
Jérémie Dimino
29d1689f87
Fix bug in Dir_contents ( #1085 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-02 10:58:42 +01:00
Jérémie Dimino
5aa9a07f1a
Fix merlin generation in presence of include_subdirs ( #1083 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-02 09:27:55 +01:00
Etienne Millon
f553a84af0
Use if_list
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-01 15:12:13 +00:00
Etienne Millon
6ed0b1b498
Only expose `if_eos`
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-01 15:12:13 +00:00
Etienne Millon
6298d283ba
Add switch_file_kind
...
This expresses all the cases where we dispatch based on the syntax
version.
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-01 15:12:13 +00:00
Etienne Millon
d9e7f54277
Workspace.Context.Opam: parse name to an option
...
This makes it possible to parse it using the applicative API.
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-01 15:12:13 +00:00
Jérémie Dimino
282c0b3c41
Add support for multi directory libraries and executables ( #1034 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-01 15:23:26 +01:00
Rudi Grinberg
6eb20866f6
Move info to lib
...
This cuts down on a lot of duplication between the library and info
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-01 13:48:57 +02:00
Rudi Grinberg
6e29bd10ef
Remove String_map module
...
We can just use String.Map
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-01 11:59:33 +02:00
Jérémie Dimino
3c5fddf5fe
Add module Lib_deps_info ( #1077 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-01 09:01:43 +01:00
Frédéric Bour
b4d8d4b355
modules_without_implementation suggestion uses old (pre-dune) syntax
...
Signed-off-by: Frédéric Bour <def@fb.com>
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-01 09:58:32 +02:00
Rudi Grinberg
3f2d260be7
Add Ordering.to_string
...
it was useful for debugging
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 13:45:25 +02:00
Rudi Grinberg
a425e0ad94
Define alias as empty if it's disabled
...
this is so that others can still depend on it
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 13:44:59 +02:00
Rudi Grinberg
4f0d056b8b
Fix Op.eval in blang
...
Neq is compatible with Lt/Gt
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 13:44:39 +02:00
Rudi Grinberg
3d9612f95c
Add enabled_if to aliases/tests
...
This field controls whether the alias/test will be run or not. Boolean
expressions are defined using the Blang.t type. This type represents simple
boolean expressions that become useful when we allow to interpolate variables
into them.
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 10:59:35 +02:00
Etienne Millon
4823795fd1
Use let%map for applicative code
...
This converts easy instances of applicative code. The rewrite rule is
generally speaking:
```ocaml
e1 >>= pat1 ->
e2 >>= pat2 ->
e3 >>| pat3 ->
r
```
to:
```ocaml
let%map pat1 = e1
and pat2 = e2
and pat3 = e3
in
r
```
Signed-off-by: Etienne Millon <me@emillon.org>
2018-07-31 10:25:58 +02:00
Rudi Grinberg
835a44ff1e
Make name and names fields optional when public_name or public_names are present ( #1041 )
...
Make name field optional when public_name is specified
When name is omitted, it will be defaulted to public_name
This feature is 1.1 only.
2018-07-31 10:15:31 +02:00
Rudi Grinberg
5c93619b47
Merge branch 'master' into jsoo-cctx
2018-07-31 08:56:35 +02:00
Rudi Grinberg
024438e3cc
Represent env_nodes using a record rather than a list
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 15:12:17 +02:00
Rudi Grinberg
bd860d29e7
Pass the workspace env to context creation
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 15:12:17 +02:00
Rudi Grinberg
61d33114ee
Bump latest version to 1.1
...
And make this version a pre-req for the env field in workspaces
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 15:12:17 +02:00
Rudi Grinberg
8cda4349fa
Use toplevel env stanza from workspace file
...
This should be the top most env stanza when it's available
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 15:12:17 +02:00
Rudi Grinberg
200f9d0a52
Add toplevel env stanza to workspace files
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 15:12:17 +02:00
Rudi Grinberg
4697a7f9f4
Refactor jsoo rules to use Compilation_context
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 15:12:08 +02:00
Rudi Grinberg
a898448510
Fix typo in comment
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 15:12:08 +02:00
Rudi Grinberg
7eb7c6e21a
Simplify module OSL evaluation
...
Use Ordered_set_lang.Make_loc to automatically book keep the location for us.
Also cut down on some module name to string conversions that was just making the
code noisy. The fake_modules detection has been changed to hide the mutabiility
from the main algorithm
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 14:33:24 +02:00
Rudi Grinberg
4970448edf
Add Module.uncapitalize
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 14:33:24 +02:00
Rudi Grinberg
093cefc58b
Add Loc preserving version of Ordered_set_lang.Make
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 14:33:24 +02:00
Rudi Grinberg
50eacb0690
Add signature to Modules_field_evaluator
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-30 14:33:24 +02:00
Jeremie Dimino
8d5bd6819f
Small refactoring of jbuild_load.ml
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-24 15:14:14 +02:00
Rudi Grinberg
845d3a4713
Update latest syntax to 1.1
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-21 20:39:13 +02:00
Rudi Grinberg
2b72c80fbc
Use correct version for error message
...
Error.deleted_in would use the current version rather than the deleted version
for the error message
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-20 14:02:58 +02:00
Rudi Grinberg
5835e5b64c
Merge pull request #1035 from diml/move-pp-files-back
...
Move back .pp files to the source directory
2018-07-19 23:00:27 +02:00
Rudi Grinberg
eb0cb1d4c8
Merge pull request #1033 from diml/i-must-not-segfault
...
Exceptions are the little-death that brings total obliteration
2018-07-19 22:40:12 +02:00
Jeremie Dimino
213e093b07
Move back .pp files to the source directory
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-19 15:59:29 +01:00
Jeremie Dimino
0ad983c729
You get a quote from Dune if you can make Dune crash
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-19 12:22:18 +01:00
Rudi Grinberg
1f0bee0cf7
Rename base to common
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-19 13:11:42 +02:00
Rudi Grinberg
14030a8ad5
Remove unused open
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-19 12:14:25 +02:00
Rudi Grinberg
655c10164d
Use syntax extension for parsing stanza
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-18 14:34:18 +02:00
Rudi Grinberg
78e18716ce
Rename Shared_stanaza to Dune_env
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-18 14:34:18 +02:00