Merge pull request #786 from rgrinberg/fix-784

Fix 784
This commit is contained in:
Rudi Grinberg 2018-05-20 20:41:10 +07:00 committed by GitHub
commit f52f5aaf92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 1 deletions

View File

@ -206,7 +206,10 @@ module Rule = struct
let dir =
match targets with
| [] ->
invalid_arg "Build_interpret.Rule.make: rule has no targets"
begin match loc with
| Some loc -> Loc.fail loc "Rule has no targets specified"
| None -> Exn.code_error "Build_interpret.Rule.make: no targets" []
end
| x :: l ->
let dir = Path.parent_exn (Target.path x) in
List.iter l ~f:(fun target ->

View File

@ -227,6 +227,14 @@
(run ${exe:cram.exe} -skip-platforms win -test run.t)
(diff? run.t run.t.corrected))))))
(alias
((name github784)
(deps ((package dune) (files_recursively_in test-cases/github784)))
(action
(chdir
test-cases/github784
(progn (run ${exe:cram.exe} -test run.t) (diff? run.t run.t.corrected))))))
(alias
((name ignored_subdirs)
(deps ((package dune) (files_recursively_in test-cases/ignored_subdirs)))
@ -522,6 +530,7 @@
(alias github759)
(alias github761)
(alias github764)
(alias github784)
(alias ignored_subdirs)
(alias include-loop)
(alias inline_tests)
@ -579,6 +588,7 @@
(alias github759)
(alias github761)
(alias github764)
(alias github784)
(alias ignored_subdirs)
(alias include-loop)
(alias inline_tests)

View File

@ -0,0 +1 @@
(rule (run ${bin:echo} foo))

View File

@ -0,0 +1,4 @@
$ dune build
File "dune", line 1, characters 0-28:
Error: Rule has no targets specified
[1]