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(melange): reproduce #7020 #7025

Merged
merged 1 commit into from
Feb 8, 2023
Merged
Changes from all commits
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
54 changes: 54 additions & 0 deletions test/blackbox-tests/test-cases/melange/gh7020.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Reproduce github #7020

$ dir=_to-install
$ mkdir $dir
$ cat >$dir/dune-project <<EOF
> (lang dune 3.7)
> (using melange 0.1)
> (package
> (name dummyfoo))
> EOF

$ cat >$dir/dune <<EOF
> (library
> (modes melange)
> (public_name dummyfoo))
> EOF

$ cat >$dir/META.dummyfoo.template <<EOF
> # DUNE_GEN
> EOF

$ dune build @install --root $dir
Entering directory '_to-install'
Leaving directory '_to-install'
$ cd $dir
$ dune install --root . --prefix _install
Installing _install/lib/dummyfoo/META
Installing _install/lib/dummyfoo/dummyfoo.ml
Installing _install/lib/dummyfoo/dune-package
Installing _install/lib/dummyfoo/melange/dummyfoo.cmi
Installing _install/lib/dummyfoo/melange/dummyfoo.cmj
Installing _install/lib/dummyfoo/melange/dummyfoo.cmt
$ cd ..

$ export OCAMLPATH=$PWD/$dir/_install/lib

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

$ cat >dune <<EOF
> (melange.emit
> (target es6)
> (alias melange)
> (libraries dummyfoo)
> (module_system es6))
> EOF

$ dune build @melange 2>&1 | awk '/Internal error/,/Raised/'
Internal error, please report upstream including the contents of _build/log.
Description:
("Option.value_exn", {})
Raised at Stdune__Code_error.raise in file