Commit Graph

1901 Commits

Author SHA1 Message Date
Jeremie Dimino cdcc520430 Disable old syntax for opam contexts in dune-workspace files
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 01:46:32 +07:00
Jeremie Dimino d5ae6dede0 Make dune require a (lang ...) line in dune-workspace files
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 19532a8c3d Generalizes handling of files starting with (lang LANG VER)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-07-01 01:46:32 +07:00
Jérémie Dimino 6823fb0d43 Restore eof_reached
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
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 e706421893 Add function to parse version header from sexp files
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-01 01:34:33 +07:00
Rudi Grinberg d7796156fd Use Sexp.Loc.none rather than reinventing in test
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-07-01 00:34:45 +07:00
Nathan Rebours 23717d1fd6 Drop findlib:x syntax in dune and display an error (#887)
Signed-off-by: Nathan Rebours <nathan@cryptosense.com>
2018-06-29 21:35:41 +01: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
Jérémie Dimino e886e948b7
Add a test where an action modify one of its dependency (#923)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-29 12:44:51 +01:00
Jérémie Dimino 793a0b7c17
Fix the build on 4.02 by emulating -no-keep-locs (#927)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-29 07:40:02 +01:00
Rudi Grinberg 8b6b83b8f5
Merge pull request #922 from rgrinberg/persistent-build-files
Use Util.Persistent to reimplemented promoted files store
2018-06-29 11:09:23 +06:30
Rudi Grinberg 8185337876
Merge branch 'master' into persistent-build-files 2018-06-29 11:07:22 +06:30
Rudi Grinberg 79224ff194 Add name to Vfile_kind functor
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 22:42:55 +06:30
Rudi Grinberg ef5a2144dd Add magic to to_out_string
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 22:40:00 +06:30
Jeremie Dimino 473dd9b440 Change the default build profile to dev during bootstrap
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 12:40:27 +01:00
Rudi Grinberg 3177404741 Remove extra module from Vfile_kind functor
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 18:02:50 +06:30
Rudi Grinberg 2071ac1072 Implement Vfile_kind in term of Persistent
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 18:01:06 +06:30
Rudi Grinberg aa22671b2f Remove Make_full from file_kind signature since it's unused
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 17:15:34 +06:30
Rudi Grinberg bc09b8fc81 Change Action.Promotion to use Utils.Persistent
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 17:15:34 +06:30
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
Rudi Grinberg 2a80d034fa Use Util.Persistent to reimplemented promoted files store
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-28 17:15:34 +06:30
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