Commit Graph

232 Commits

Author SHA1 Message Date
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
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 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 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
Jeremie Dimino 23a9c65ade make promote
Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
2018-06-04 16:26:13 +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
Rudi Grinberg 077df76f6d Add a ppx rewriter example for the generated install file (#850)
Add an example using jbuild and dune files.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-04 12:08:20 +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
Rudi Grinberg d17292f6cd Add quoted case to quoting test
When ${@}, the current behavior should be preserved

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-06-01 16:49:12 +07:00
Rudi Grinberg b057c40668
Merge branch 'master' into add-classical-ppx-test 2018-05-31 10:43:22 +07:00
Rudi Grinberg 0677c2d79c Add test for using a dune library with ocamlfind
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-30 15:39:58 +07:00
Rudi Grinberg 939341af16 Add test for classical ppx
Test that generated META can be used by ocamlfind

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-30 14:59:37 +07:00
Rudi Grinberg 8f16afe293 Fix merlin generation
The optional build contexts were being dropped from the obj dirs instead of the
source dirs.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-05-30 14:39:47 +07:00
Rudi Grinberg 88e71c3432
Speed up merlin generation (#805)
Improve merlin generation by minimizing intermediate strings and reusing a buffer.
2018-05-26 11:04:21 +07:00
Anil Madhavapeddy b2dd904847 odoc: make indexes work with the development version of odoc
We now generate library titles at level 2 instead of level 1,
and remove trailing fullstop after the `modules` entry.

The development branch of odoc has a more precise parser that
enforces that there is only a single title level field in the
generated odoc.

Closes #791

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
2018-05-23 10:59:19 +01:00
Rudi Grinberg a6f2b5be9b Fix exception to be friendly when loc is available
When the loc is available, the error is likely because of an ill-defined user
rule. We should simply reflect the location back to the user.
2018-05-20 13:22:59 +07:00
Rudi Grinberg b1be607b9b Reproduce stack trace leaking out to user 2018-05-20 13:14:24 +07:00
Rudi Grinberg da827f7946
Merge pull request #769 from rgrinberg/fix-764
Detect circular sym links
2018-05-16 21:58:22 +07:00
Jeremie Dimino 58de56ad0d Remove useless call 2018-05-16 15:19:04 +01:00
Jeremie Dimino 62997d6676 fix 2018-05-16 15:18:36 +01:00
Jeremie Dimino 2cf1631730 Try again 2018-05-16 15:15:45 +01:00
Jeremie Dimino 46479fd083 Try to make tests pass in Travis 2018-05-16 14:40:21 +01:00
Jeremie Dimino 2192a549f4 Use dev/inode to detect loops 2018-05-16 14:23:01 +01:00
Jeremie Dimino 3a2e136e5c Add a more complex test 2018-05-16 13:54:12 +01:00
Jeremie Dimino 2033b34983 Update tests
- remove tests that were creating files outside the test directory
- add tests with cycles longer than 1
2018-05-16 13:12:45 +01:00
Jérémie Dimino 95d9cf0415
Refactor Jbuild.Scope_info.Name and Dune_project.name (#775) 2018-05-15 14:07:02 +01:00
Rudi Grinberg 241ec87a2b Add test for symlinking outside workspace 2018-05-15 19:42:33 +07:00
Rudi Grinberg c9916f4a76 Add some more test cases for symlinks 2018-05-15 17:33:51 +07:00
Rudi Grinberg c1f81bef64 Add test for #764 2018-05-15 17:33:27 +07:00
Jérémie Dimino bc19e14b35
Add ignored_subdirs stanza (#767) 2018-05-12 15:38:22 +02:00
Jeremie Dimino bffd5407ce Fix #734 2018-05-10 11:31:39 +01:00
Jeremie Dimino 30d05eb4f1 Add test for #734 2018-05-10 11:31:39 +01:00
Jeremie Dimino ef7a5519aa Fix #761 2018-05-10 11:27:56 +01:00
Jeremie Dimino ba78e05d95 Add a test for #761 2018-05-10 11:27:56 +01:00
Jeremie Dimino 7c1e1923a0 Fix #759 2018-05-09 16:32:35 +01:00
Jeremie Dimino 4ffa88726a Add a test for #759 2018-05-09 16:21:01 +01:00
Rudi Grinberg 8eba040b92 Rename Alias.of_path to Alias.of_user_written_path
And add a loc argument for correct error messages
2018-05-09 08:05:57 +07:00
Rudi Grinberg 76c1a32da4 Add tests for invalid alias paths 2018-05-09 08:05:57 +07:00
Jérémie Dimino 4d8ca489be
Add support for environment & build profiles (#419) 2018-05-04 16:49:25 +01:00
Jeremie Dimino adde723702 Update tests 2018-05-04 12:26:26 +01:00
Jeremie Dimino dabb77eb09 Rename all jbuild.inc files 2018-05-04 12:26:26 +01:00
Jeremie Dimino dc0a6d4401 Rename all jbuild files 2018-05-04 12:26:26 +01: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
Rudi Grinberg 7b17fa013f Fix #717
Extensions should be removed from the map of basenames to mld paths
2018-04-29 00:52:29 +07:00
Rudi Grinberg 575cbce699 Add test showing odoc failure with index.mld 2018-04-29 00:34:53 +07:00
Rudi Grinberg 40631805ef Multiple private libs requires odoc 2018-04-27 23:30:42 +07:00
Rudi Grinberg f84550b98a Tag jsoo and utop tests as taking externals 2018-04-27 21:34:48 +07:00
Jérémie Dimino 8796df8a74
Fix flags in output-obj test (#728) 2018-04-26 18:47:20 +01:00