Skip to content

Commit

Permalink
test: top closure with mli only (ocaml#7081)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Feb 15, 2023
1 parent 5fdaa96 commit e4c5974
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions test/blackbox-tests/test-cases/top-closed-mli-only.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
This test demonstrates a dependency being pulled via an mli only module:

$ cat >dune-project <<EOF
> (lang dune 3.7)
> EOF

$ lib=foo

$ cat >dune <<EOF
> (library
> (name $lib)
> (wrapped false)
> (modules_without_implementation uast))
> EOF

$ cat >identifier.ml <<EOF
> let create () = ()
> EOF
$ cat >identifier.mli <<EOF
> val create : unit -> unit
> EOF

$ cat >uast.mli <<EOF
> module Identifier = Identifier
> EOF

$ cat >upretty_printer.ml <<EOF
> let f () = Uast.Identifier.create ()
> EOF

$ mkdir bin
$ cat >bin/dune <<EOF
> (executable
> (name use)
> (libraries $lib))
> EOF

$ cat >bin/use.ml <<EOF
> let () = Upretty_printer.f ()
> EOF

Build in development mode:

$ dune exec bin/use.exe

And now in release

$ dune exec bin/use.exe --release 2>&1 | grep -v "cd _build"
[1]

0 comments on commit e4c5974

Please sign in to comment.