Skip to content

Commit

Permalink
test: reproduce @ocaml-index failing with package management
Browse files Browse the repository at this point in the history
  • Loading branch information
liate7 committed Oct 3, 2024
1 parent 451e5b4 commit 7166428
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/blackbox-tests/test-cases/ocaml-index/gh10985/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(dirs (:standard \ external_sources))
(library
(name foo)
(libraries mypkg.lib))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 3.17)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang package 0.1)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(library
(public_name mypkg.lib)
(name test_lib))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(lang dune 3.11)
(package (name mypkg))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let x = ()
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/ocaml-index/gh10985/foo.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let () = Test_lib.x
23 changes: 23 additions & 0 deletions test/blackbox-tests/test-cases/ocaml-index/gh10985/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This test attempts to build the ocaml index while depending on a library
installed through a lock file.

This is based off of the pkg/libraries.t test, just taking advantage of
being in its own directory.

This can't be just written to disk, I /think/ so it cat get an absolute path
in the source stanza.

$ cat >dune.lock/mypkg.pkg <<EOF
> (version 0.0.1)
> (source (copy $PWD/external_sources))
> (build (run dune build --release --promote-install-file=true . @install))
> EOF

$ dune build @ocaml-index
Error: This rule defines a directory target "default/.pkg/mypkg/target" that
matches the requested path
"default/.pkg/mypkg/target/lib/mypkg/lib/cctx.ocaml-index" but the rule's
action didn't produce it
-> required by _build/default/.foo.objs/cctx.ocaml-index
-> required by alias ocaml-index
[1]

0 comments on commit 7166428

Please sign in to comment.