Rudi Grinberg
c72414406d
Merge pull request #849 from rgrinberg/remove-concat-or-split
...
Remove Concat_or_split
2018-06-07 00:13:17 +07:00
Rudi Grinberg
bc53047a95
Merge branch 'master' into remove-concat-or-split
2018-06-07 00:13:09 +07:00
Rudi Grinberg
0c048ac0c5
Remove module private type
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-07 00:02:21 +07:00
Rudi Grinberg
ea045f4867
Merge pull request #862 from rgrinberg/intern-order
...
Add an intern option to control ordering
2018-06-06 23:52:31 +07:00
Rudi Grinberg
eff7a24390
Add an intern option to control ordering
...
There are 2 ways to order interned strings:
* Fast but "random"
* Slow but respects the original order
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:48:11 +07:00
Rudi Grinberg
abfa90b5a7
Update tests
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:44:14 +07:00
Rudi Grinberg
bdeef73c29
Add test for proper concatenation
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:34 +07:00
Rudi Grinberg
7d8a7e94aa
Fix incorrect concatenation for multivalues in quoted context
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
6ebff9d388
Move Value.t list functions to Value.L
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
c96df4dc15
Inline expand_var
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
9cc8ff920a
Special case t.items = [Text _] and t.items = []
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
243f3437f2
implement expand in terms of partial_expand
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Jeremie Dimino
124d942310
s/jbuild/dune/ in misc test
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
774306c396
Remove old usage for Var_expansion in ppx driver
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
9221b1ed6c
Change echo to be variadic
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
ff173b98d8
Share quote handling in partial and normal expansion
...
The partial expansion had a bug in its condition for a 1 element value list.
This fixes the bug by implementing the condition once and for all.
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
589943df60
Simplify String_with_vars
...
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>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
bab65e989d
Allow for proper expansoin of vars in super contexts
...
Multivalues are no longer allowed when unquoted, and paths are no longer
needlessly converted.
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
588129d582
Move Var_expansion to own module
...
These variables can occur outside actions so such expansions shouldn't live
under Var_expansion.
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
cadee0e661
Write explicit interface for Expand_to
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
eab7c46bdb
Add flag to allow/disallow multivalue expansions
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:42:33 +07:00
Rudi Grinberg
9545d9a854
Add length function to exapnsions
...
This is useful for an error message that includes the number of items we've
expanded to.
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:41:57 +07:00
Rudi Grinberg
731b61b0b9
Improve the error message with invalid strings
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:41:57 +07:00
Rudi Grinberg
8351fcb466
Move the multivalue error to a function
...
Since it's used more than once
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:41:57 +07:00
Rudi Grinberg
bb58cf8599
s/false/true/
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:41:57 +07:00
Rudi Grinberg
c1d6faef79
Remove Concat_or_split
...
Thie property will now be determined from the context
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:41:57 +07:00
Rudi Grinberg
69c0ab48ce
Add test for concat_or_split
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 23:41:57 +07:00
Rudi Grinberg
0219b0ffdb
Merge pull request #859 from rgrinberg/path-table
...
Add Path.Table
2018-06-06 23:39:43 +07:00
Rudi Grinberg
b3870f78b1
Merge branch 'master' into path-table
2018-06-06 23:39:36 +07:00
Jérémie Dimino
bb7827a7b2
Make the output of Dune deterministic in tests ( #855 )
...
When the root is not the cwd, print a relative path for the "Entering
..." line rather than an absolute one.
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-06 16:25:04 +01:00
Rudi Grinberg
2a85cbe074
Merge branch 'master' into path-table
2018-06-06 22:24:18 +07:00
Jérémie Dimino
0fafebe9be
Fix generation of the ppx key for jbuild directories ( #860 )
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-06 16:17:40 +01:00
Rudi Grinberg
6ada532b10
type specialize (=)
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 22:15:53 +07:00
Rudi Grinberg
2350bb1161
Use polymorhic equality
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 19:23:13 +07:00
Rudi Grinberg
d4e8e6dbd4
Change all path indexed tables to Path.Table
...
This will allow to experiment with faster hashing for paths
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 13:54:24 +07:00
Rudi Grinberg
3ab6be3cc2
Add a functorized hashtable with all the functions we expect to stdune
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 13:54:11 +07:00
Rudi Grinberg
3ad4c06f4a
Add Path.Table module
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-06 13:28:14 +07:00
Jeremie Dimino
ec6ca4be67
Refactor handling of backend selection errors + add tests
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino
84f1f9b82b
Add a hint for ppx rewriters that are not compatible
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino
898a2ffa02
Update gen-opam-install-file test
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino
cc5e8443c4
Improve the code for building and installing the compat ppx.exe program
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino
adcf44942f
Add a warning for with_lib_deps
...
I just spent an hour debugging a stupid bug caused by this...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino
b5dfb826ef
Restore old ppx behavior for directories with jbuild files
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino
ed583b7651
Add List.assoc
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jeremie Dimino
b35fbbd7b2
Abstract the ppx driver system
...
- remove hard-coded knowledge of ocaml-migrate-parsetree and ppx_driver
- get the exact driver parameters directly from the driver itself
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 19:19:10 +01:00
Jérémie Dimino
9358bd5d64
Make Module.t private and add Module.make ( #853 )
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-05 18:38:27 +01:00
Jeremie Dimino
23a9c65ade
make promote
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-04 16:26:13 +01:00
Jeremie Dimino
2d1ca05e67
Update the documentation of S-expressions
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-04 13:57:27 +01:00
Jeremie Dimino
0244797029
Update changelog
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-04 13:57:27 +01:00
Jeremie Dimino
5b01ed8246
Add support for block strings
...
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-04 13:57:27 +01:00