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>
Things like \a are no longer allowed. Before they would be interpreted
as a literal \a. This will allow to introduce new escape sequences in
the future if needed.
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
They are almost never used and they complicate the language. The
parsing of jbuild files in unchanged.
Signed-off-by: Jeremie Dimino <jdimino@janestreet.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>
Replace the current generated parser by an ocamllex lexer + a simple
parser.
The new code is:
- much simpler and smaller
- shouldn't cause ocamlopt to stack overflow anymore on BSD systems
- slightly slower but not that much
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
Use the build_dir variable rather than the "_build" string and treat the case
Path.build_dir argument differently. Previously this would error:
Path.insert_after_build_dir_exn Path.build_dir "foo"
Now, it will return _build/foo
- 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
* This requires moving Fatal_error and Loc_error to Stdune.Exn as well
* Clflags.workspace_root can no longer be used in Path.to_absolute_filename. We
just take a parameter instead for now.