It is always used the same way: `peek raw`, and sometimes preceded by
a `eos`. Remove the old `peek` and add:
- `peek_exn` which is the same the old `peek raw`
- `peek` which returns `None` if the end of sequence is reached
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>
- make (diff ...) trailing cr on Win32
- add a (cmp ...) action for comparing binary files
- add a test and run it in AppVeyor
Fix#844
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
Make it expand only to Value.t since the string only version wasn't really used.
Variable expansions are now Value.t list. Which also gives the flexibility for a
value to expand to a collection of more than 1 value.
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
These variables can occur outside actions so such expansions shouldn't live
under Var_expansion.
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>
As `Sys.readdir`, it returns entries in an nondeterministic order.
This can cause problems if caller relies on the list being sorted.
See #820.
Signed-off-by: Etienne Millon <etienne@cryptosense.com>
This uses two different extensions:
- `.d` corresponds to the raw `ocamldep` output.
- `.all-deps` corresponds to this output, merged with the dependencies
of all the interfaces mentioned in the earlier.
This also means that `.all-deps` files will contain output from multiple
files.
It's simply to just use Env.t everywhere. Also, there's no need to have the env
in the execution context since it's not used for anything. Only the env that is
passed directly is used.