Jeremie Dimino
af6f003d13
Refactor ordered_set_lang.ml
...
- use the new s-expression parsing API
- simplify the types and the parsing
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 11:26:42 +01:00
Jeremie Dimino
f9f5503e81
Change the signature of Of_peek.peek
...
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>
2018-06-28 11:26:42 +01:00
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
Jérémie Dimino
9585c8f79d
Move ocamldep output files to the object directory ( #918 )
...
- this avoid the need for the "already_used" business
- this will make it easier to support multi-dir libraries without copy_files
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 09:46:20 +01:00
Rudi Grinberg
26e94463d4
Merge pull request #905 from rgrinberg/template-sexp-take2
...
Template Parsing in Dune files via the Lexer
2018-06-28 13:19:08 +06:30
Rudi Grinberg
ec14661a01
Update tests for new variables syntax
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 09:48:35 +06:30
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
Jérémie Dimino
90cdae96b2
Add a script to help making bulk updates of the tests ( #914 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-27 12:21:41 +01:00
Rudi Grinberg
f7a4e517fe
Merge pull request #912 from rgrinberg/migration-manual
...
Add migration page to manual
2018-06-25 15:59:25 +06:30
Rudi Grinberg
e53f838ceb
Merge branch 'master' into migration-manual
2018-06-25 15:58:39 +06:30
Rudi Grinberg
c07e0655fb
Refer to migration page from manual and readme
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-25 15:54:32 +06:30
Rudi Grinberg
f36fd54017
Add migration page to manual
...
This includes the old migration page + a simple migration check list
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-25 15:07:28 +06:30
Jeremie Dimino
daa4be3dd8
Add Stanza.file_kind
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-25 08:14:27 +01:00
Jeremie Dimino
f46a6aae53
Make (diff ...) work on Windows
...
- 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>
2018-06-25 08:14:27 +01:00
Jérémie Dimino
0eb302252e
Improve the syntax of ppx rewriters and flags ( #910 )
...
- old syntax: (pps (ppx1 -arg1 ppx2 (-foo x)))
- new syntax: (pps ppx1 -arg ppx2 -- -foo x)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-25 07:56:35 +01:00
Rudi Grinberg
f300468f2b
Merge pull request #908 from rgrinberg/pp-univ
...
Add sexp conversion to univeral maps
2018-06-21 23:24:05 +06:30
Rudi Grinberg
467cecfccc
Add sexp conversion to univeral maps
...
Very useful for debugging
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-21 23:06:39 +06:30
Rudi Grinberg
f35d068836
Move Jbuild.syntax to Stanza module
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-21 12:54:27 +01:00
Jeremie Dimino
fc968efc4d
Update changelog
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-20 16:17:22 +01:00
Jeremie Dimino
58997d9df7
Present menhir as an extension
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-20 16:06:38 +01:00
Jeremie Dimino
74c008ea62
Implement automatic edition of the dune-project file for extensions
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-20 16:06:38 +01:00
Rudi Grinberg
bb1ea7c56c
Merge pull request #902 from rgrinberg/faster-bootstrap
...
Faster bootstrap
2018-06-20 21:16:46 +06:30
Rudi Grinberg
c723150026
Merge branch 'master' into faster-bootstrap
2018-06-20 21:09:17 +06:30
Rudi Grinberg
45766933af
Merge pull request #900 from rgrinberg/separate-lexers
...
Split dune and jbuild lexers
2018-06-20 21:03:38 +06:30
Rudi Grinberg
9883c4450b
Add jsoo boot file
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 20:36:04 +06:30
Rudi Grinberg
98f055dbed
add menhir.boot.ml
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 20:32:57 +06:30
Rudi Grinberg
8597f599d0
Add inline_tests.boot file
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 20:31:52 +06:30
Rudi Grinberg
5a46dc1998
Add jbuild_lexer.boot to speed up bootstrap
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 20:21:40 +06:30
Rudi Grinberg
15ffc107ff
Add mli's to {dune,jbuild}_lexer
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 20:21:23 +06:30
Rudi Grinberg
d6778a50a2
Rename Lexer0 to Lexer_shared
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 20:16:12 +06:30
Rudi Grinberg
cd6d5dba53
Simplify jbuild lexer and move types around
...
The types should exist in the lexer module where they're used
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 20:00:35 +06:30
Rudi Grinberg
1e5dc322e2
Remove some legacy stuff from the new dune lexer
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 19:50:58 +06:30
Rudi Grinberg
d7ab3d962c
Harmonize names in dune and jbuild lexers
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 19:50:50 +06:30
Rudi Grinberg
e3aa13424d
Split dune and jbuild lexers
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 19:29:16 +06:30
Rudi Grinberg
411552e4c7
Merge pull request #891 from rgrinberg/atom-jbuild-dune
...
Dune & Jbuild validation for atoms
2018-06-20 19:08:42 +06:30
Rudi Grinberg
53d9c64468
Print atom using atom constructor
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
f180470158
Remove outdated comment about atoms
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
7d2c7d9579
Parameterize sexp_tests on dune and jbuild syntax
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
8a87b5b5bf
Move validation to a `print` function
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
a1d714f9d4
Fix definition of is_valid_jbuild
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
99fbac26ab
Remove constructor side validation
...
And make the tests reflect back Invalid_argument
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
5618be7ab0
Fix 4.02.3 compat
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
46eba2ef98
Improve validation of jbuild atoms
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
ad3a95655d
Dune & Jbuild validation for atoms
...
Atoms can now be constructed and pretty printed with a syntax = Jbuild | Dune.
The syntax controls validation that will be used to make sure we are printing
something/reading valid
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 18:23:23 +06:30
Rudi Grinberg
2ed5f3fcfd
Merge pull request #898 from rgrinberg/fix-lexer-include
...
Select lexer based on dune vs jbuild
2018-06-20 18:22:26 +06:30
Rudi Grinberg
a033ddb894
Merge branch 'master' into fix-lexer-include
2018-06-20 18:22:11 +06:30
Jérémie Dimino
94c921f9c4
Rename files_recursively_in to source_tree ( #899 )
...
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-20 10:45:54 +01:00
Rudi Grinberg
7d33cb2275
Select lexer based on dune vs jbuild
...
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-20 15:38:55 +06:30