Skip to content

Commit

Permalink
test(pkg): reproduce depext crash (#10939)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Sep 20, 2024
1 parent 4c28fa0 commit 772afb5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/blackbox-tests/test-cases/pkg/depexts/unknown-variable.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Solving with an unknown variable on depexts:

$ . ../helpers.sh
$ mkrepo
$ add_mock_repo_if_needed

The "foobar" variable is not defined:
$ mkpkg foo <<EOF
> depexts: [[ "unzip" ] {foobar}]
> EOF

Make a project that uses the foo library:
$ cat > dune-project <<EOF
> (lang dune 3.13)
> (package
> (name bar)
> (depends foo))
> EOF

Locking should succeed and not include the "unzip" package
$ dune pkg lock 2>&1 | head -n 1
Error: exception Failure("Undefined boolean filter value: foobar")

$ [ -e dune.lock/foo.pkg ] && cat dune.lock/foo.pkg
[1]

0 comments on commit 772afb5

Please sign in to comment.