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

test: reproduce @ocaml-index failing with package management #10986

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
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.
liate7 marked this conversation as resolved.
Show resolved Hide resolved

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this paragraph.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That paragraph only applies to the next command. Originally, I just had the build command in the test case, which didn't work, so I moved building the package file back to here.


$ 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]