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
f5c45a72a8
Do not duplicate profile in missing deps message
...
Closes #1106
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-07 09:53:34 +00:00
Rudi Grinberg
9a504bc86a
Remove pointless polymorphic variant and check_path
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 11:42:25 +03:00
Rudi Grinberg
6dc6ac3668
Fix #1101
...
Do not attempt to convert string -> path -> string as this loses information
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 11:42:25 +03:00
Rudi Grinberg
264263c819
Split target resolution from string -> path conversion
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 11:42:25 +03:00
Rudi Grinberg
6197a49c41
Simplify target resolution code
...
Split it into 3 functinos
* Resolve 1 targets
* Do logging
* Resolve all targets
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 11:42:25 +03:00
Rudi Grinberg
f74a064aed
Fix #1103
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-07 00:36:27 +03:00
Etienne Millon
7129564d12
Fix placeholders in dune subst documentation
...
They were substituted, leading to confusing documentation.
Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-02 14:30:59 +00:00
Rudi Grinberg
6e29bd10ef
Remove String_map module
...
We can just use String.Map
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-01 11:59:33 +02:00
Jérémie Dimino
3c5fddf5fe
Add module Lib_deps_info ( #1077 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-01 09:01:43 +01:00
Jérémie Dimino
4e15fa1522
Fix #1070 ( #1072 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-31 18:06:17 +01:00
Rudi Grinberg
4769f9df9f
Plumb through env node
...
workspace -> context -> super context
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-18 14:34:18 +02:00
Rudi Grinberg
1b71d57bba
Move promotion to own module
...
It's not really related to actions
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-18 14:27:09 +02:00
Rudi Grinberg
bf2d842075
Split executable parts of Action into Action_exec
...
This is required for breaking the dep cycle between the context and the Action module
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-18 14:27:09 +02:00
Jeremie Dimino
62f0e826ce
Switch bin/main.ml to the let%map syntax
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-17 11:37:22 +01:00
Rudi Grinberg
b4b7dde4f5
Add alias just to be sure
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-11 17:29:45 +02:00
Rudi Grinberg
f9c1d56f55
Improve the path custom conv to use original path when restoring args
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-11 16:57:29 +02:00
Rudi Grinberg
ab85720a06
Move custom args to Arg submodule
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-11 16:41:29 +02:00
Rudi Grinberg
02beadb856
Use path argument for workspace and config file
...
This path argument will take paths relatively to the initial CWD
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-11 16:41:29 +02:00
Rudi Grinberg
ab6bb0d5f7
Fix workspace lookup in cojnuction with --root
...
The workspace is specified to the initial CWD hence we must convert it a path
relative to it
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-11 16:41:29 +02:00
Etienne Millon
654282c676
Fix "dune external-lib-deps" hint for dune exec
...
Previously, it was not displaying any target.
Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-07-11 13:21:14 +02:00
Etienne Millon
1d594ce5a3
Fix typos in source code
...
Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-07-10 13:05:58 +01:00
Etienne Millon
8c3690cdaa
Add List.find_exn
...
Signed-off-by: Etienne Millon <etienne@cryptosense.com>
2018-07-10 13:47:02 +02:00
Jérémie Dimino
3348b6a913
Adapt the behavior of dune subst for dune projects ( #960 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-08 09:51:16 +01:00
Jérémie Dimino
e56fba9a57
Do not use opam-installer to copy files ( #941 )
...
Instead of calling opam-installer, manually parse .install files and copy the files.
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-03 10:10:09 +01:00
Jeremie Dimino
0c47cab606
Fix cmdliner errors
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 21:57:40 +01:00
Jeremie Dimino
81bcd0f3e1
Add a "default" alias defined as follow:
...
- 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>
2018-07-01 21:50:44 +01:00
Jeremie Dimino
30db63ef71
Support @@alias to build an alias non-recursively
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 21:50:44 +01:00
Jeremie Dimino
744430b684
Update doc
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 01:46:32 +07:00
Jeremie Dimino
7c6ecc821f
Reimplement workspace.ml with the new parsing API
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 01:46:32 +07:00
Jeremie Dimino
d6c35e01df
Split xxx-workspace file between jbuilder and dune
...
- jbuilder only looks for jbuild-workspace files
- dune only looks for dune-workspace files
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 01:45:02 +07:00
Jérémie Dimino
7e79e2870d
Make the set language more future proof ( #930 )
...
- forbid list starting by an atom not starting with - or :
- allow to avoid the toplevel parentheses in dune files
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-29 21:11:47 +01:00
Rudi Grinberg
4738b6df89
Make promoted files a set
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 17:15:34 +06:30
Jeremie Dimino
2982567639
Make the default build profile be dev
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 11:23:10 +01:00
Jeremie Dimino
16d34f4a07
Add Which_program to know whether we are dune or jbuilder
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 11:23:10 +01:00
Rudi Grinberg
2257a2057b
Add templates to Usexp.t directly
...
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>
2018-06-28 09:46:10 +06:30
Jérémie Dimino
0f68e56f64
Remove most useless parentheses from the syntax ( #915 )
2018-06-27 16:38:05 +01:00
Rudi Grinberg
be7e3d6dfc
Implement --build-dir and change Path.t to use symbolic paths
...
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>
2018-06-02 18:14:44 +07:00
Jérémie Dimino
1860438605
Add a jbuilder transition package ( #796 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 18:19:30 +01:00
Rudi Grinberg
d600db2158
Change Build_job to be set
...
The elements are unique and the order isn't well defined anyway
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-24 10:44:47 +07:00
Rudi Grinberg
f7f22cbf52
Make Path.parent return option
...
Use _exn whenever we know the parent exists
2018-05-09 17:56:50 +07:00
Jérémie Dimino
4d8ca489be
Add support for environment & build profiles ( #419 )
2018-05-04 16:49:25 +01:00
Jeremie Dimino
dc0a6d4401
Rename all jbuild files
2018-05-04 12:26:26 +01:00
Rudi Grinberg
25c34c222c
Remove all hard coded uses of "_build"
...
Always route these cases through Path.build_dir
2018-05-02 22:38:50 +07:00
Jérémie Dimino
325584adfc
Renaming to Dune ( #721 )
...
- install two identical binaries: jbuilder and dune
- rename the man pages to dune-*
- change the name in man pages
- change the name of libraries
- add support for dune-project files and add a dune-project file
- add support for dune-workspace files
- start updating the manual
- update the tests
2018-05-02 12:56:12 +01:00
Jérémie Dimino
53202d0a09
Make -j default to the number of CPUs ( #726 )
2018-04-26 16:10:14 +01:00
Rudi Grinberg
f44b8bdb1b
Unhardcode _build dir everywhere
2018-04-25 18:22:48 +07:00
Rudi Grinberg
b02c61f63c
Change the prog arg in Process to Path.t
2018-04-25 16:30:18 +07:00
Rudi Grinberg
7820e29d28
Port Io to use Path.t
2018-04-25 03:25:27 +07:00
Jérémie Dimino
239ff0054e
Remove jbuilder_ prefix for vendored libraries ( #720 )
...
It's not useful since we are not installing them. Also unwrap
libraries that are unwrapped upstream.
2018-04-24 14:38:30 +01:00