Skip to content

Commit

Permalink
Add reproduction case for #3143
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Feb 15, 2020
1 parent f3319aa commit 7a8ff30
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 5 deletions.
22 changes: 17 additions & 5 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,21 @@
(diff? run.t run.t.corrected)))))

(rule
(alias external-lib-deps)
(deps (package dune) (source_tree test-cases/external-lib-deps))
(alias external-lib-deps-github3143)
(deps (package dune) (source_tree test-cases/external-lib-deps/github3143))
(action
(chdir
test-cases/external-lib-deps
test-cases/external-lib-deps/github3143
(progn
(run %{exe:cram.exe} run.t -sanitizer %{bin:sanitizer})
(diff? run.t run.t.corrected)))))

(rule
(alias external-lib-deps-simple)
(deps (package dune) (source_tree test-cases/external-lib-deps/simple))
(action
(chdir
test-cases/external-lib-deps/simple
(progn
(run %{exe:cram.exe} run.t -sanitizer %{bin:sanitizer})
(diff? run.t run.t.corrected)))))
Expand Down Expand Up @@ -2722,7 +2732,8 @@
(alias exec-cmd)
(alias exec-missing)
(alias exes-with-c)
(alias external-lib-deps)
(alias external-lib-deps-github3143)
(alias external-lib-deps-simple)
(alias extra-lang-line)
(alias fallback-dune)
(alias findlib)
Expand Down Expand Up @@ -2977,7 +2988,8 @@
(alias exec-cmd)
(alias exec-missing)
(alias exes-with-c)
(alias external-lib-deps)
(alias external-lib-deps-github3143)
(alias external-lib-deps-simple)
(alias extra-lang-line)
(alias fallback-dune)
(alias findlib)
Expand Down
41 changes: 41 additions & 0 deletions test/blackbox-tests/test-cases/external-lib-deps/github3143/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Reproduce #3143

$ echo "(lang dune 2.3)" > dune-project
$ touch dummypkg.opam
$ cat >dune <<EOF
> (library
> (public_name dummypkg)
> (libraries base doesnotexist.foo))
> EOF
$ dune external-lib-deps @install
Internal error, please report upstream including the contents of _build/log.
Description:
("Map.find_exn: failed to find key",
{ key = "doesnotexist.foo"; keys = [ "doesnotexist" ] })
Backtrace:
Raised at file "src/stdune/code_error.ml", line 9, characters 30-62
Called from file "src/dune/findlib/findlib.ml", line 498, characters 8-44
Called from file "src/dune/lib.ml", line 1843, characters 24-59
Called from file "src/dune/lib.ml", line 1189, characters 10-25
Called from file "src/dune/lib.ml", line 1203, characters 21-49
Called from file "src/dune/lib.ml", line 1203, characters 21-49
Called from file "src/dune/lib.ml", line 1181, characters 10-38
Called from file "src/dune/lib.ml", line 1287, characters 25-76
Called from file "list.ml", line 121, characters 24-34
Called from file "src/dune/lib.ml", line 1269, characters 6-1023
Called from file "src/dune/lib.ml" (inlined), line 1110, characters 9-75
Called from file "src/dune/lib.ml", line 1109, characters 6-104
Called from file "src/dune/lib.ml", line 1192, characters 12-42
Called from file "src/dune/lib.ml", line 1851, characters 10-61
Called from file "src/dune/super_context.ml", line 529, characters 18-56
Called from file "src/dune/dir_with_dune.ml", line 23, characters 55-67
Called from file "src/dune/super_context.ml", line 526, characters 6-692
Called from file "src/dune/gen_rules.ml", line 412, characters 6-102
Called from file "src/fiber/fiber.ml", line 102, characters 8-15

I must not segfault. Uncertainty is the mind-killer. Exceptions are
the little-death that brings total obliteration. I will fully express
my cases. Execution will pass over me and through me. And when it
has gone past, I will unwind the stack along its path. Where the
cases are handled there will be nothing. Only I will remain.
[1]

0 comments on commit 7a8ff30

Please sign in to comment.