Commit Graph

2424 Commits

Author SHA1 Message Date
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
Rudi Grinberg d2f31c9517
Merge pull request #1088 from rgrinberg/remove-all-opam-yes
Remove all --yes from travis
2018-08-02 12:55:21 +02: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
Rudi Grinberg 2e0e674d26 Remove all --yes from travis
We can achieve the same effect with: OPAMYES="true"

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 12:10:34 +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
Rudi Grinberg be84bcffbb
Merge pull request #1087 from rgrinberg/remove-duplicate-yes
Remove duplicate --yes from opam calls
2018-08-02 10:11:09 +02:00
Rudi Grinberg c520a72972 Remove duplicate --yes from opam calls
These --yes might have been intended for opam list, but opam list doesn't ask
for confirmation so we can just remove it.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-02 09:23:02 +02:00
Etienne Millon 9afd3d2157
Merge pull request #1068 from ocaml/more-applicative-syntax
More applicative syntax
2018-08-01 17:17:10 +02: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 13d0ec5269
Merge pull request #1082 from rgrinberg/info-in-lib
Move info to lib
2018-08-01 15:22:30 +02: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 385a3ebd54
Merge pull request #1081 from rgrinberg/remove-string-map
Remove String_map module
2018-08-01 12:35:37 +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
Rudi Grinberg d6c2a434db
Merge pull request #1078 from rgrinberg/update-changes
Update CHANGELOG with optional names entry
2018-08-01 10:19:02 +02:00
Rudi Grinberg 919c0bc403 Don't use rst syntax in markdown file
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-01 10:07:29 +02:00
Rudi Grinberg 7d0a9c5cff Update CHANGELOG with optional names entry
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-01 10:07:24 +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 58bfe376e1
Merge pull request #1074 from rgrinberg/clarify-opam
Fix opam build instructions in usage.rst
2018-08-01 09:52:51 +02:00
Rudi Grinberg 500dd1182c
Merge pull request #1075 from rgrinberg/fix-manual
Little manual fixes
2018-08-01 09:52:35 +02:00
Rudi Grinberg 1b553d56c6 Fix osl link jsoo page
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 21:33:07 +02:00
Rudi Grinberg e3a7e68c37 Fix duplicate label in manual
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 21:30:15 +02:00
Rudi Grinberg 5094d58774 Fix opam build instructions in usage.rst
They should include dune subst when pinning as well

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 21:00:08 +02:00
Jérémie Dimino 4e15fa1522
Fix #1070 (#1072)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-31 18:06:17 +01:00
Rudi Grinberg 9ea98b1846
Merge pull request #1069 from rgrinberg/port-enabled-if-tests
Port enabled if tests
2018-07-31 17:35:35 +02:00
Rudi Grinberg bd1c57c03a Remvoe -skip-platforms from cram.mll
It can be supported via enabled-if now

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 13:47:46 +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 de0ccfaec4
enabled_if (#819)
# Problem

The problem this PR is trying to solve is a bit specific to dune, but it's likely that it will be encountered by other projects as well. Currently, dune has a complicated script for generating test definitions that make sure tests run only in environments which support them. For example, some tests may not run on win32. A mechanism to enable tests conditionally would fix these problems.

# Proposal

Add an `enabled_if` field to aliases to toggle the execution of the alias. This field will be valued by a little EDSL for expressing boolean expressions. Here's an example of the kind of conditions we'd express with it:

```
(alias
 ((name runtest)
  (deps (foo.exe))
  (action (run ${<}))
  (enabled_if (and (<> ${os} win32) (>= ${ocaml_version} 4.0.5)))))
```

# Progress

This stalled a bit since I'm not sure how to do handle type safety here. Ideally, we only allow numbers and versions to be compared with `>=`, `<`, etc. I guess we really need to annotate which variables are comparable and making sure that we don't compare numbers to strings or versions.
2018-07-31 13:07:57 +02:00
Rudi Grinberg 3e4720e479 CHANGES entry
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-31 11:01:08 +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 e59feacb6d
Merge pull request #1067 from ocaml/applicative-map-syntax
Use let%map for applicative code
2018-07-31 10:33:19 +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 a13325e389
Merge pull request #1048 from rgrinberg/jsoo-cctx
Refactor jsoo rules to use Compilation_context.t
2018-07-31 09:36:01 +02:00
Rudi Grinberg 5c93619b47
Merge branch 'master' into jsoo-cctx 2018-07-31 08:56:35 +02:00
Rudi Grinberg ad0b376aeb
Merge pull request #1064 from rgrinberg/jsoo-manual
Move Jsoo content to its own page
2018-07-30 19:03:07 +02:00
Etienne Millon fc5e3e7b59
Merge pull request #1065 from ocaml/test-cat-output
Do not rely on cat output in tests
2018-07-30 17:45:27 +02:00
Etienne Millon 772c1c05ac Do not rely on cat output in tests
The error messages of `cat` can change a bit, for example if a different
locale is set. This uses a shell test instead.

Signed-off-by: Etienne Millon <me@emillon.org>
2018-07-30 17:40:48 +02:00
Rudi Grinberg baa5b773b5
Merge pull request #1038 from rgrinberg/workspace-env-2
Env stanza in workspace files part #2
2018-07-30 17:07:54 +02:00
Rudi Grinberg 89a381530d
Merge branch 'master' into workspace-env-2 2018-07-30 17:07:41 +02:00
cedlemo 7af0af94ed doc: remove %{first-dep} in quick-start.rst
Signed-off-by: Cédric Le Moigne <cedlemo@gmx.com>
2018-07-30 15:30:55 +01:00
Marek Kubica ed5f2c5b40 ocamlyacc does not require parens either
Signed-off-by: Marek Kubica <marek@xivilization.net>
2018-07-30 15:01:43 +01:00
Marek Kubica 371c863a32 Parens not required
Closes #1054
Closes #1056

Signed-off-by: Marek Kubica <marek@xivilization.net>
2018-07-30 15:01:43 +01:00