Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cram & vendored dirs bug #3860

Merged
merged 3 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Unreleased
- Do no run ocamldep to for single module executables & libraries. The
dependency graph for such artifacts is trivial (#3847, @rgrinberg)

- Fix cram tests inside vendored directories not being interpreted correctly.
(@rgrinberg, #3860)

2.7.1 (2/09/2020)
-----------------

Expand Down
1 change: 0 additions & 1 deletion src/dune_engine/file_tree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ end = struct
if
Dune_project.cram parent_dir.project
&& Cram_test.is_cram_suffix basename
&& status = Normal
then
Sub_dirs.Status.Data_only
else
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 1.11)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
; This file is generated by duniverse.
; Be aware that it is likely to be overwritten by your next duniverse pull invocation.

(vendored_dirs *)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(lang dune 2.7)
(name dune)
(cram enable)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(lang dune 1.11)

(dialect
(name d)
(implementation (extension foo))
(interface (extension bar)))

(dialect
(name d)
(implementation (extension foo2))
(interface (extension bar2)))
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ dune build --root bad1
Entering directory 'bad1'
File "dune-project", line 9, characters 1-74:
9 | (name d)
10 | (implementation (extension foo2))
11 | (interface (extension bar2)))
Error: dialect "d" is already defined
[1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This test should demonstrate that cram tests inside the vendor dir have their
directories marked as data only

$ dune build