François Bobot
7f09979853
Adds support for findlib.dynload
...
which allows to easily dynlink packages and their dependencies.
Dune is needed for putting in the binary the list of package
statically linked.
Signed-off-by: François Bobot <francois.bobot@cea.fr>
2018-08-28 18:10:14 +01:00
Rudi Grinberg
f700de1572
Add ~loc to of_string_exn
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-28 13:30:40 +03:00
Rudi Grinberg
071c2377de
Introduce Lib_name.t and Lib_name.Local.t types
...
These types help distinguish external and internal library names
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-28 13:30:40 +03:00
Rudi Grinberg
72c322d75b
Fix #1166 by not using Path in configurator
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-28 12:20:22 +03:00
Rudi Grinberg
d522acb1e8
Add test case to show regression 1166
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-28 12:20:22 +03:00
Rudi Grinberg
234534e301
Make String.spit_n work with n > len
...
To make things consistent with drop/take
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-26 14:44:22 +03:00
Rudi Grinberg
7f18816447
Add unit tests for String.{take,drop,split_n}
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-26 14:41:05 +03:00
Pavel Senchanka
b7da0304f1
Add some unit tests for fibers. ( #1156 )
...
Signed-off-by: Pavel Senchanka <pavel.senchanka@gmail.com>
2018-08-23 17:56:17 +01:00
Jeremie Dimino
fa33c061aa
Update output-obj test
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-23 14:17:08 +01:00
Rudi Grinberg
f3a7725614
s/sexp_of_t/to_sexp/g
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 16:02:30 +03:00
Rudi Grinberg
700b78e094
Calculate stamps directly from marshal
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 15:09:45 +03:00
Rudi Grinberg
b9dada554e
Add independent pretty printing for sexp
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg
463ee3653a
Invert the stdune and dsexp dependency
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg
bc9e8dba1c
Rename sexp_of_t to dgen and t to dsexp where appropriate
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg
328ad3411c
Move a bunch of parsing to Dsexp
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Jérémie Dimino
c87d8e95e5
Do not build and install shared libs when not supported ( #1165 )
...
Read `ocamlc -where`/Makefile.config to determine whether this is
supported.
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-22 14:48:02 +01:00
Anurag Soni
ea0baeb4bc
multi line error highlights
...
Reference: #1131
Signed-off-by: Anurag Soni <anuragsoni.13@gmail.com>
2018-08-21 15:39:26 +02:00
Rudi Grinberg
20f9b2cf0a
Add test for (ocamllex (..)) form in jbuild
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-20 20:06:46 +03:00
Rudi Grinberg
da3def9dc7
Fix parsing of ocamllex in jbuild files
...
The long form would be rejected
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-20 20:06:46 +03:00
Rudi Grinberg
bb2bf59ff1
Add test case for ocamllex + jbuild bug report
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-20 20:06:46 +03:00
Etienne Millon
6fe9ec68c0
Improve error message for `dune utop`
...
Closes #1149
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-20 13:59:24 +02:00
Etienne Millon
a611205ff8
Initial implementation of `dune fmt`
...
This is a first draft with three main limitations:
- it is language agnostic, so it does not know about field names
- it is not able to parse comments
- it does not break long lines
The formatting rules are pretty simple:
- lists composed only of atoms, quoted strings, templates, and
singletons are displayed on a single line
- other lists are displayed with a line break after each element
- an empty line is inserted between toplevel stanzas
The CLI is pretty light: it can either read a file or standard input,
and fix a file in place. In addition, the command is named
`unstable-fmt` for now, until some guarantees are given.
Closes #940
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-20 10:21:47 +02:00
Rudi Grinberg
f707168d6c
Generate sorted .install files
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-15 12:30:58 +03:00
Rudi Grinberg
9abaa040b8
Add tests for installed stubs artifacts
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-15 11:22:41 +03:00
Etienne Millon
0e781e87e1
Fix pluralize function
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-13 13:15:49 +00:00
Etienne Millon
0603f4fca6
Display actual stanza when package is ambiguous
...
Previously we displayed `(install ...)` in all cases.
Closes #1123
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-13 13:15:49 +00:00
Etienne Millon
06bc3b1d0c
Highlight error locations
...
This is a simple implementation of an error printer that highlights the
error location with squiggly lines, for example:
File "dune", line 1, characters 14-21:
(copy_files %{read:x}/*)
^^^^^^
The message is not displayed in some cases, like if the file does not
exist, or if the location spans multiple lines.
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-13 12:51:55 +00:00
Etienne Millon
4f22d32c68
Fix error when copy_files source does not exist
...
Closes #1099
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-13 12:29:49 +00:00
Etienne Millon
c192aa460d
Rename Jbuild module to Dune_file
...
While it supports both, let's move forward and use the new name.
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-13 10:53:51 +00:00
Jérémie Dimino
da5c1a0c2e
Rename private libraries and add a test to make sure we don't publicize too much ( #1111 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-09 10:03:06 +01:00
Rudi Grinberg
2899744908
Merge pull request #1114 from diml/envs-and-contexts
...
Fix a bad interaction between `(env ...)` and `(merlin)` in the workspace file
2018-08-08 23:35:00 +03:00
Jeremie Dimino
8ea075dd6b
Disable last added test
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-08 17:29:53 +01:00
Jeremie Dimino
6a9c32dcb4
Fix bug exposed by previous commit
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-08 15:54:58 +01:00
Jeremie Dimino
3e33d23535
Expose a bug involving environments and build contexts
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-08 15:23:00 +01:00
Rudi Grinberg
9a13221263
Clean up the error handling for lib names
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
d30361a180
Fix overly strict validation of invalid names
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
ca7696f2c3
Add test case for a library with an invalid name
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
5706e4ee56
Make invalid public name warn when (wrapped false)
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
c08cec1f4b
Add test case for name when it doesn't matter
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
925bc84427
Fix error message
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
31e4f6f18a
Fix error messages for invalid lib names
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
131310d144
Fix validation of library names
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
317388fd95
Refactor code to to have a dedicated type for Library.name
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
67c6de4864
Add test for #1102
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 15:07:26 +03:00
Rudi Grinberg
63b49f946b
Mark more tests as having external deps
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-08 01:30:22 +03:00
Etienne Millon
f5c45a72a8
Do not duplicate profile in missing deps message
...
Closes #1106
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-07 09:53:34 +00:00
Rudi Grinberg
6dc6ac3668
Fix #1101
...
Do not attempt to convert string -> path -> string as this loses information
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 11:42:25 +03:00
Rudi Grinberg
a3c6f417d0
Add test case for 1101
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 11:42:25 +03:00
Rudi Grinberg
f74a064aed
Fix #1103
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 00:36:27 +03:00
Rudi Grinberg
99e0686447
Test case for --dev bug
...
jbuilder doesn't accept --dev like it should
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 00:34:35 +03:00