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
Rudi Grinberg
9c9ea7c60a
Move everything to Dsexp for now
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg
4ba8f7d225
Move sexpable to dsexp
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg
b34394509a
Start moving dune related sexp stuff to Dsexp
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg
05705c7a79
Move combinators to sexp_intf
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg
3a012b4938
Remove references to Usexp in Exn
...
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
François Bobot
0119b13c50
Extends the environment with the variable OCAMLFIND_IGNORE_DUPS_IN
...
Prevent ocamlfind to warn about multiple definition if the
library is also installed
Signed-off-by: François Bobot <francois.bobot@cea.fr>
2018-08-21 16:42:06 +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
83d43ecc42
Make Dune_project.t abstract
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-21 13:12:28 +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
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
f130b62648
Add context and all supported versions when an syntax id is unset
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-17 14:45:19 +03:00
Rudi Grinberg
9c7bb2878a
Split library rules into more logical steps
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-16 13:51:16 +03:00
Rudi Grinberg
841e55ddb8
Fix msvc_hack_cclibs using combinators
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-15 23:18:01 +03: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
b6303ad292
Remove extension argument for Lib.L.archive_files
...
It's easier to just pass this extension when initializing the library since the
function was just used with this extension
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-15 11:23:10 +03:00
Rudi Grinberg
e1cd3b9094
Revert changes to resolve_user_deps
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-14 12:32:21 +03:00
Rudi Grinberg
9849a7dbb0
Move list related Result functions to Result.List
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-14 12:32:21 +03:00
Rudi Grinberg
a60fe76117
Simplify more Result code with Result.List.map
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-14 12:32:20 +03:00
Rudi Grinberg
dc681a5961
Simplify resolution with Result combinators
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-14 12:32:20 +03:00
Rudi Grinberg
6a08e36f4b
Simplify closure calculation with Result.iter
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-14 12:32:20 +03:00
Jeremie Dimino
b9c97949d1
Restore the open No_io in lib_rules.ml
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-14 10:27:11 +01:00
Rudi Grinberg
cb2b676c2a
Move library rules to lib_rules module
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-14 10:43:51 +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
Rudi Grinberg
06190648d3
Simplify lib.ml with punning
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-10 00:07:10 +03:00
Jérémie Dimino
1187b3501e
Fix #1116 ( #1118 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-09 12:35:39 +01: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
Etienne Millon
27b460c320
Use pattern matching when possible
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-08 21:22:43 +00:00
Etienne Millon
0ec9baf257
Add comparison functions for names
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-08 21:15:45 +00:00
Etienne Millon
8306f261e7
Add List.physically_equal
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-08 21:15:45 +00:00
Etienne Millon
c6d5faa79f
Use explicit comparison function for Loc.t
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-08 21:15:45 +00:00
Etienne Millon
35ea17ebc4
Use explicit comparison for path functions
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-08 21:15:45 +00:00
Etienne Millon
da1f65bc56
Use explicit comparison for Syntax.Version.t
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-08 21:15:45 +00:00
Etienne Millon
4f1d1a0ea5
Add Comparable.Operators
...
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-08 21:15:45 +00: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
2913d3e501
Refactor a bit some code in workspace.ml
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-08 15:55:52 +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
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
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
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