Commit Graph

2393 Commits

Author SHA1 Message Date
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 6045568e9a
Merge pull request #1154 from ocaml/utop-no-args-error-message
Improve error message for `dune utop`
2018-08-20 16:55:08 +02: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 99d82c235c
Merge pull request #1130 from ocaml/dune-fmt
Initial implementation of `dune fmt`
2018-08-20 10:41:03 +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 abf04b033a Fix syntax in menhir docs
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-19 19:24:35 +03:00
Rudi Grinberg a04f77dca1 Update configurator to use dune syntax
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-19 19:03:19 +03:00
Rudi Grinberg f5ed6586d5
Merge pull request #1151 from ocaml/update-hacking-md
Update some outdated file paths in HACKING.md
2018-08-19 13:29:47 +03:00
Patrick Stapfer e09edec252 Update some outdated file paths in HACKING.md
Signed-off-by: Patrick Stapfer <ryyppy@users.noreply.github.com>
2018-08-19 12:23:59 +02:00
Rudi Grinberg 309dd5ff43
Merge pull request #1146 from rgrinberg/improve-error-when-syntax-missing
Add context and all supported versions when an syntax id is unset
2018-08-17 17:19:35 +03: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 166dd06886
Merge pull request #1144 from rgrinberg/split-lib-rules-further
Split library rules into more logical steps
2018-08-16 14:02:04 +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 ce0042bbe5
Merge pull request #1142 from rgrinberg/drop-prefix-simplify
Fix msvc_hack_cclibs using combinators
2018-08-16 13:47:18 +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 9804526100
Merge pull request #1139 from rgrinberg/sort-installed-paths
Generate sorted .install files
2018-08-15 13:02:56 +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 4dff1c3c8b
Merge pull request #1138 from rgrinberg/add-tests-stubs
Add tests for installed stubs artifacts
2018-08-15 11:24:16 +03:00
Rudi Grinberg ef46a443b2
Merge pull request #1136 from rgrinberg/simplify-stub-handling
Remove extension argument for Lib.L.archive_files
2018-08-15 11:23:59 +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 9abaa040b8 Add tests for installed stubs artifacts
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-15 11:22:41 +03:00
Jérémie Dimino cdb2342e41
Fix #1132 (#1137)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-15 09:20:00 +01:00
Rudi Grinberg a08dcc043e
Merge pull request #1134 from ddickstein/patch-1
Update project-layout-specification.rst
2018-08-14 23:11:17 +03:00
Dani Dickstein a398bd7765
Update project-layout-specification.rst
I think ``dune-project`` had an extra backtick.

Signed-off-by: Dani Dickstein <daniel.dickstein@gmail.com>
2018-08-14 14:30:19 -04:00
Rudi Grinberg acfb844e93
Merge pull request #1122 from rgrinberg/result-iter
Simplify Result code with Combinators
2018-08-14 19:58:28 +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
Rudi Grinberg f38edc22f0
Merge pull request #1129 from rgrinberg/split-gen-rules
Move library rules to lib_rules module
2018-08-14 12:31:40 +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 a99c73bbef
Merge pull request #1126 from ocaml/ambiguous-package-more-precise-error
Display actual stanza when package is ambiguous
2018-08-14 09:14:00 +02: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 7a8b86d6c2
Merge pull request #1121 from ocaml/highlight-error-locations
Highlight error locations
2018-08-13 15:15:30 +02: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 1cd5050861
Merge pull request #1120 from ocaml/fix-1099
Fix error when copy_files source does not exist
2018-08-13 14:51:27 +02: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 4ecca14b70
Merge pull request #1119 from ocaml/rename-jbuild-module
Rename Jbuild module to Dune_file
2018-08-13 14:28:23 +02: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 87f962df10
Merge pull request #1100 from ocaml/remove-some-polymorphic-comparisons
Remove some polymorphic comparisons
2018-08-08 23:42:43 +02: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