-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproduction case to show that installing deps to the stdlib breaks
Signed-off-by: Marek Kubica <marek@tarides.com>
- Loading branch information
1 parent
f998110
commit 343198f
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
test/blackbox-tests/test-cases/pkg/dependency-install-file.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
A package that installs itself into the ocaml stdlib should work. | ||
|
||
$ . ./helpers.sh | ||
|
||
$ mkdir nondune | ||
$ cd nondune | ||
$ cat > nondune.ml <<EOF | ||
> let main () = print_endline "Nondune" | ||
> let () = main () | ||
> EOF | ||
$ ocamlc -c nondune.ml | ||
$ ocamlc -o nondune.cma -a nondune.cmo | ||
$ cat > nondune.install <<EOF | ||
> lib_root: [ | ||
> "nondune.cma" {"ocaml/nondune.cma"} | ||
> "nondune.cmi" {"ocaml/nondune.cmi"} | ||
> ] | ||
> lib: [ | ||
> "META" {"META"} | ||
> ] | ||
> EOF | ||
$ cat > META <<EOF | ||
> directory = "^" | ||
> archive(byte) = "nondune.cma" | ||
> EOF | ||
$ cat > nondune.opam <<EOF | ||
> opam-version: "2.0" | ||
> build: [ | ||
> [true] | ||
> ] | ||
> EOF | ||
$ cd .. | ||
|
||
With this project set up, lets depend on it. | ||
|
||
$ mkdir foo | ||
$ cd foo | ||
$ mkrepo | ||
$ solve_project <<EOF | ||
> (lang dune 3.15) | ||
> (pin | ||
> (url "file://$PWD/../nondune") | ||
> (package (name nondune))) | ||
> (package | ||
> (name foo) | ||
> (depends nondune)) | ||
> EOF | ||
Solution for dune.lock: | ||
- nondune.dev | ||
$ cat > dune <<EOF | ||
> (library | ||
> (name foolib) | ||
> (modes byte) | ||
> (modules foolib) | ||
> (wrapped false) | ||
> (libraries nondune)) | ||
> (executable | ||
> (name foo) | ||
> (modules foo) | ||
> (libraries foolib) | ||
> (modes byte)) | ||
> EOF | ||
$ cat > foo.ml <<EOF | ||
> let () = Foolib.main () | ||
> EOF | ||
$ cat > foolib.ml <<EOF | ||
> let main () = Nondune.main () | ||
> EOF | ||
$ dune exec ./foo.exe 2>&1 | sed -e 's#File unavailable: .*ocaml/nondune.cma$#File unavailable: ocaml/nondune.cma#' |