`dune build -w` keeps running and automatically rebuilds the project
when changes are detected.
Note that on platforms other than Linux, you need to have `fswatch`
installed for watch mode to work.
Signed-off-by: Pavel Senchanka <pavel.senchanka@gmail.com>
- 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>
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>
- if "default" is specified by the user explicitely, use this
definition
- otherwise assume the following definition:
(alias
(name default)
(deps (alias_rec install)))
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
Templates are now directly in dune's sexp language. The syntax is change to %{}
from ${} and $(). Old templates are still supported in jbuild files.
Other changes in this PR:
* Removal of ! patterns in variables
* Strict expansion for templates in dune files. Missing vars are now an error
* Using the correct syntax to parse included files in dune
* Improvements to the tests
* Syntax aware pretty printing of sexps. Now you must pass Dune vs. Jbuild to
print sexps
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
The motivation for this change is implement the --build-dir feature. This
feature lets us control the build directory which previously always defaulted to
_build. To accomplish this, Path.t had to be modified to be:
External of External.t | In_source_tree of Local.t | In_build_dir of Local.t
To represent the 3 kinds of paths dune is dealing with. The In_build_dir
constructor in particular, is relative to Path.root or some external path.
A few other refactorings had to be done to support this transition:
* The workspace is now "settable". This means that we no longer have to pass it
explicitly when converting local to absolute paths.
* Path.is_local no longer makes sense and is renamed to Path.is_managed.
Roughly, is_managed identifies paths in the build and source directories.
* Path.absoulte has been renamed of_filename_relative_to_initial_cwd
* Path.Local.root is now "." (as opposed to "")
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>