Skip to content

Reproduction case for #11824 #11825

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
63 changes: 63 additions & 0 deletions test/blackbox-tests/test-cases/pkg/depexts/portable-lockfile.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Makes sure that the depext mechanism works with portable lockfiles

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

Create package that has depexts. Normally these would be conf-* packages in
opam-repository but depexts are supported on any kind of package.

All depexts resolve to the same hypothetical package name for reproducability.

$ mkpkg foo <<EOF
> build: [ ["true"] ]
> depexts: [
> ["dev-foo"] {os-family = "debian"}
> ["dev-foo"] {os-distribution = "arch"}
> ["dev-foo"] {os-distribution = "fedora"}
> ["dev-foo"] {os-distribution = "centos"}
> ["dev-foo"] {os-distribution = "mageia"}
> ["dev-foo"] {os-distribution = "rhel"}
> ["dev-foo"] {os-distribution = "ol"}
> ["dev-foo"] {os-distribution = "alpine"}
> ["dev-foo"] {os-distribution = "nixos"}
> ["dev-foo"] {os = "openbsd"}
> ["dev-foo"] {os = "macos" & os-distribution = "homebrew"}
> ["dev-foo"] {os = "freebsd"}
> ["dev-foo"] {os = "win32" & os-distribution = "cygwinports"}
> ["dev-foo"] {os = "cygwin"}
> ]
> EOF

Create a project that uses this package

$ cat > dune-project <<EOF
> (lang dune 3.18)
> (package
> (name x)
> (depends foo))
> EOF

Locking should work and output us the name of the depext.

$ dune pkg lock
Solution for dune.lock:
- foo.0.0.1
$ dune show depext
dev-foo

Enabling portable lock files should work

$ export DUNE_CONFIG__PORTABLE_LOCK_DIR=enabled
$ dune pkg lock
Solution for dune.lock:
- foo.0.0.1


Asking for the depexts should resolve to our platform and print the same depext
as above.

$ dune show depext


It currently does not and this is a bug, #11824.
Loading