Commit Graph

523 Commits

Author SHA1 Message Date
Etienne Millon 46338d109c Always display the line number in file excerpts
Signed-off-by: Etienne Millon <me@emillon.org>
2018-09-03 09:54:29 +02:00
Anurag Soni 81797f86cc Truncated view for blocks longer than 10 lines
Signed-off-by: Anurag Soni <anuragsoni.13@gmail.com>
2018-09-03 09:26:50 +02:00
Rudi Grinberg 8449b46bc1 Fix tests
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-31 19:05:17 +03:00
Rudi Grinberg 366c102aa0 Add .mli to one of transitioned modules
Somehow this removes the deprecation

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-31 19:04:48 +03:00
Rudi Grinberg dfd3b1083c Handle case when module alias exists
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-31 19:04:48 +03:00
Rudi Grinberg f47834d80b Add modules_without_implementation example to wrapped transition mode
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-31 19:04:48 +03:00
Rudi Grinberg f9ad608e8c Fix deprecation attribute for transition modules
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-31 19:04:48 +03:00
Rudi Grinberg 492286ba12 Don't hardcode the transition message to be date based
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-31 19:04:48 +03:00
Rudi Grinberg d1d7672e96 wrapped transition mode
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-31 19:04:48 +03:00
Etienne Millon f8f9db2d9c When there are extra parentheses, display the exn
Dune tries to be helpful when there are extra parentheses, but sometimes
it is a bit too eager. This wraps the exception so that the original one
is displayed.

Closes #1173
Closes #1181

Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-31 17:05:06 +02:00
Jérémie Dimino 5cad714100
Promote a subset of the files + emacs integration (#1192)
- add support for promoting a selected list of files
- add an emacs mode with helpers for promoting the correction for the current buffer

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-31 11:12:49 +01:00
Rudi Grinberg 265adc8eae
Add fields for variants (#1148)
Add variants fields but guard them behind an extension
2018-08-29 15:41:28 +03:00
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