Open
Description
Describe the bug
It is not possible to install the OCaml package opam-dune-lint with opam-nix.
To Reproduce
opam-dune-lint = "*";
nix log /nix/store/4yh6d9v480lqnyp1hmnpplwjj3w2s4yi-opam-dune-lint-0.6.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/r2mp32hw1nzli83kpbx0zikw1zccmhwx-opam-dune-lint-0.6.tbz
source root is opam-dune-lint-0.6
setting SOURCE_DATE_EPOCH to timestamp 1713450085 of file opam-dune-lint-0.6/types.ml
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
patching script interpreter paths in .
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
�[1;35mWarning�[0m: Cache directories could not be created: Permission denied; disabling
cache
�[3mHint:�[0m Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
created
Done: 100% (18/18, 0 left) (jobs: 0)
Done: 94% (18/19, 1 left) (jobs: 0)
Done: 81% (18/22, 4 left) (jobs: 0)
Done: 81% (18/22, 4 left) (jobs: 0)
Done: 68% (22/32, 10 left) (jobs: 0)
Done: 86% (33/38, 5 left) (jobs: 1)
Done: 90% (56/62, 6 left) (jobs: 1)
Done: 92% (63/68, 5 left) (jobs: 1)
Done: 83% (66/79, 13 left) (jobs: 0)
Done: 83% (66/79, 13 left) (jobs: 0)
Done: 74% (66/89, 23 left) (jobs: 0)
Done: 77% (71/92, 21 left) (jobs: 5)
Done: 80% (74/92, 18 left) (jobs: 4)
Done: 83% (77/92, 15 left) (jobs: 6)
Done: 85% (79/92, 13 left) (jobs: 4)
Done: 88% (81/92, 11 left) (jobs: 2)
Done: 89% (82/92, 10 left) (jobs: 2)
Done: 91% (84/92, 8 left) (jobs: 2)
Done: 92% (85/92, 7 left) (jobs: 1)
Done: 93% (86/92, 6 left) (jobs: 1)
Done: 94% (87/92, 5 left) (jobs: 1)
Done: 95% (88/92, 4 left) (jobs: 1)
Done: 96% (89/92, 3 left) (jobs: 1)
Done: 85% (92/108, 16 left) (jobs: 8)
Done: 85% (92/108, 16 left) (jobs: 16)
Done: 85% (92/108, 16 left) (jobs: 16)
�[0;1mFile "tests/test_fix_bug_66.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/6e93900ba13019018bc1937b20afa6fe/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_fix_bug_66.t tests/test_fix_bug_66.t.corrected)�[0m
--- tests/test_fix_bug_66.t 2024-12-06 10:15:50.267501154 +0000
+++ tests/test_fix_bug_66.t.corrected 2024-12-06 10:15:50.267501154 +0000
@@ -14,7 +14,6 @@
$ touch dune
$ opam-dune-lint
- empty.opam: changed after its upgrade from 'dune describe opam-files'!
- empty.opam: OK
- Warning in empty: The package has a dune-project file but no explicit dependency on dune was found.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left) (jobs: 16)
Done: 85% (92/108, 16 left, 1 failed) (jobs: 15)
Done: 85% (92/108, 16 left, 1 failed) (jobs: 14)
�[0;1mFile "tests/test_dune_describe.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/659ddfd02262c924d5365da7cc16d6b3/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_dune_describe.t tests/test_dune_describe.t.corrected)�[0m
--- tests/test_dune_describe.t 2024-12-06 10:15:50.353503206 +0000
+++ tests/test_dune_describe.t.corrected 2024-12-06 10:15:50.353503206 +0000
@@ -34,6 +34,10 @@
$ touch main.ml test.ml lib.ml
$ dune describe external-lib-deps
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
(default
((executables
((names (main))
@@ -61,6 +65,10 @@
(opam-state required)))
(internal_deps ())))))
$ dune describe package-entries
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
((test
(((source Dune)
(entry
@@ -177,5 +185,9 @@
(section BIN)
(optional false)))))))
$ dune describe opam-files
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
((test.opam
"# This file is generated by dune, edit dune-project instead\nopam-version: \"2.0\"\nsynopsis: \"Test package\"\ndepends: [\n \"dune\" {>= \"2.8\"}\n \"ocamlfind\" {>= \"1.0\"}\n \"libfoo\"\n \"odoc\" {with-doc}\n]\nbuild: [\n [\"dune\" \"subst\"] {dev}\n [\n \"dune\"\n \"build\"\n \"-p\"\n name\n \"-j\"\n jobs\n \"@install\"\n \"@runtest\" {with-test}\n \"@doc\" {with-doc}\n ]\n]\n"))
Done: 85% (92/108, 16 left, 1 failed) (jobs: 14)
Done: 85% (92/108, 16 left, 2 failed) (jobs: 14)
Done: 85% (92/108, 16 left, 2 failed) (jobs: 13)
�[0;1mFile "tests/test_fix_bug_59.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/cc5ebfd987e0c067ce81a7bd5053c368/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_fix_bug_59.t tests/test_fix_bug_59.t.corrected)�[0m
--- tests/test_fix_bug_59.t 2024-12-06 10:15:50.403504399 +0000
+++ tests/test_fix_bug_59.t.corrected 2024-12-06 10:15:50.403504399 +0000
@@ -14,8 +14,14 @@
> EOF
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ opam-dune-lint -f
- dummy.opam: OK
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat > dune-project << EOF
> (lang dune 2.7)
@@ -31,8 +37,14 @@
> EOF
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ opam-dune-lint -f
- dummy.opam: OK
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat > dune-project << EOF
> (lang dune 2.7)
@@ -49,5 +61,11 @@
> EOF
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ opam-dune-lint -f
- dummy.opam: OK
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 2 failed) (jobs: 13)
Done: 85% (92/108, 16 left, 3 failed) (jobs: 13)
Done: 85% (92/108, 16 left, 3 failed) (jobs: 12)
�[0;1mFile "tests/test_vendoring.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/b8a787192fcd03387203cdb31e2e20fe/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_vendoring.t tests/test_vendoring.t.corrected)�[0m
--- tests/test_vendoring.t 2024-12-06 10:15:51.324526373 +0000
+++ tests/test_vendoring.t.corrected 2024-12-06 10:15:51.324526373 +0000
@@ -46,6 +46,10 @@
$ touch bin/main.ml lib/lib.ml
$ (cd vendored && touch vendored.ml vendored.opam)
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Replace all version numbers with "1.0" to get predictable outut.
@@ -61,8 +65,6 @@
on "bos":
$ opam-dune-lint </dev/null
- main.opam: changes needed:
- "ocamlfind" {>= "1.0"} [from lib]
- Note: version numbers are just suggestions based on the currently installed version.
- Run with -f to apply changes in non-interactive mode.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 3 failed) (jobs: 12)
Done: 85% (92/108, 16 left, 4 failed) (jobs: 12)
Done: 85% (92/108, 16 left, 4 failed) (jobs: 11)
�[0;1mFile "tests/test_optional_public_lib.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/272f470ef77c03503871c2d0352cc580/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_optional_public_lib.t tests/test_optional_public_lib.t.corrected)�[0m
--- tests/test_optional_public_lib.t 2024-12-06 10:15:51.723535893 +0000
+++ tests/test_optional_public_lib.t.corrected 2024-12-06 10:15:51.723535893 +0000
@@ -43,6 +43,10 @@
$ touch bin/main.ml lib/lib.ml lib/file.disabled.ml lib/file.enabled.ml optional/optional.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Replace all version numbers with "1.0" to get predictable outut.
@@ -58,9 +62,6 @@
on "bos":
$ opam-dune-lint </dev/null
- main.opam: changes needed:
- "ocamlfind" {>= "1.0"} [from lib]
- optional.opam: OK
- Note: version numbers are just suggestions based on the currently installed version.
- Run with -f to apply changes in non-interactive mode.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 4 failed) (jobs: 11)
Done: 85% (92/108, 16 left, 5 failed) (jobs: 11)
Done: 85% (92/108, 16 left, 5 failed) (jobs: 10)
�[0;1mFile "tests/test_fix_bug_68.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/b60f1fb65df6b4d68a39b283c65bb37c/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_fix_bug_68.t tests/test_fix_bug_68.t.corrected)�[0m
--- tests/test_fix_bug_68.t 2024-12-06 10:15:51.843538756 +0000
+++ tests/test_fix_bug_68.t.corrected 2024-12-06 10:15:51.843538756 +0000
@@ -37,6 +37,10 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Replace all version numbers with "1.0" to get predictable output.
@@ -45,10 +49,6 @@
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "./test.opam"
- Warning in test: The package has a dune-project file but no explicit dependency on dune was found.
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 5 failed) (jobs: 10)
Done: 85% (92/108, 16 left, 6 failed) (jobs: 10)
Done: 85% (92/108, 16 left, 6 failed) (jobs: 10)
�[0;1mFile "tests/test_fix_bug.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/dd5d2b0b2e59977b00bea097a1500c81/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_fix_bug.t tests/test_fix_bug.t.corrected)�[0m
--- tests/test_fix_bug.t 2024-12-06 10:15:51.883539710 +0000
+++ tests/test_fix_bug.t.corrected 2024-12-06 10:15:51.883539710 +0000
@@ -33,6 +33,10 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Replace all version numbers with "1.0" to get predictable output.
@@ -41,12 +45,9 @@
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "./test.opam"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ sed 's/= [^&)}]*/= */g' test.opam
# Preserve comments
@@ -59,7 +60,4 @@
"ocamlfind" {>= *}
"libfoo"
"dune" {>= *}
- "fmt" {>= *}
- "bos" {>= *& with-test}
- "opam-state" {>= *& with-test}
]
Done: 85% (92/108, 16 left, 6 failed) (jobs: 10)
Done: 85% (92/108, 16 left, 7 failed) (jobs: 9)
Done: 85% (92/108, 16 left, 7 failed) (jobs: 7)
Done: 85% (92/108, 16 left, 7 failed) (jobs: 6)
�[0;1mFile "tests/test_dune.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/e5df49822e77ef40dee9748da14253e5/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_dune.t tests/test_dune.t.corrected)�[0m
--- tests/test_dune.t 2024-12-06 10:15:52.018542931 +0000
+++ tests/test_dune.t.corrected 2024-12-06 10:15:52.019542955 +0000
@@ -25,51 +25,35 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ export OPAM_DUNE_LINT_TESTS=y
Check that the missing libraries are detected:
$ opam-dune-lint </dev/null
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Run with -f to apply changes in non-interactive mode.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))
- (fmt
- (>= *))
- (ocamlfind
- (>= *))
+ (ocamlfind (>= *))
libfoo))
Check adding and removing of test markers:
@@ -89,33 +73,30 @@
> EOF
$ dune build @install
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" [from /] (remove {with-test})
- "ocamlfind" [from /] (remove {with-test})
- "bos" {with-test} [from /] (missing {with-test} annotation)
- "opam-state" {with-test} [from /] (missing {with-test} annotation)
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state :with-test)
- (bos
- (and
- :with-test
- (>= *)))
- fmt
- (ocamlfind
- (>= *))
+ opam-state
+ (bos (>= *))
+ (fmt :with-test)
+ (ocamlfind (and (>= *) :with-test))
libfoo))
$ opam-dune-lint
- test.opam: OK
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 7 failed) (jobs: 6)
�[0;1mFile "tests/test_empty_dune.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/8504b4163e6b08b0686506563d971a5d/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_empty_dune.t tests/test_empty_dune.t.corrected)�[0m
--- tests/test_empty_dune.t 2024-12-06 10:15:52.032543265 +0000
+++ tests/test_empty_dune.t.corrected 2024-12-06 10:15:52.032543265 +0000
@@ -22,6 +22,10 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Replace all version numbers with "1.0" to get predictable outut.
@@ -30,32 +34,13 @@
Check that all the libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "ocamlfind" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
- (synopsis "Test package")
- (depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))
- (ocamlfind
- (>= *))
- (fmt
- (>= *))))
+ (synopsis "Test package"))
Done: 85% (92/108, 16 left, 7 failed) (jobs: 6)
�[0;1mFile "tests/test_opam.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/9dd3935e28a82716b777a10500a6423c/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_opam.t tests/test_opam.t.corrected)�[0m
--- tests/test_opam.t 2024-12-06 10:15:52.030543217 +0000
+++ tests/test_opam.t.corrected 2024-12-06 10:15:52.030543217 +0000
@@ -35,6 +35,10 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Replace all version numbers with "1.0" to get predictable output.
@@ -43,12 +47,9 @@
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "./test.opam"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat test.opam | sed 's/= [^&)}]*/= */g'
# Preserve comments
@@ -61,7 +62,4 @@
"ocamlfind" {>= *}
"libfoo"
"dune" {>= *}
- "fmt" {>= *}
- "bos" {>= *& with-test}
- "opam-state" {>= *& with-test}
]
Done: 85% (92/108, 16 left, 7 failed) (jobs: 6)
�[0;1mFile "tests/test_opam_update.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/e7d09c93801fcb64432fdd39e9a6674e/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_opam_update.t tests/test_opam_update.t.corrected)�[0m
--- tests/test_opam_update.t 2024-12-06 10:15:52.021543002 +0000
+++ tests/test_opam_update.t.corrected 2024-12-06 10:15:52.021543002 +0000
@@ -24,6 +24,10 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ cat test.opam
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
@@ -55,13 +59,9 @@
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "ocamlfind" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat test.opam | sed 's/= [^&)}]*/= */g'
# This file is generated by dune, edit dune-project instead
@@ -69,10 +69,6 @@
synopsis: "Test package"
depends: [
"dune" {>= *}
- "opam-state" {>= *& with-test}
- "bos" {>= *& with-test}
- "ocamlfind" {>= *}
- "fmt" {>= *}
"cmdliner"
"odoc" {with-doc}
]
Done: 85% (92/108, 16 left, 7 failed) (jobs: 6)
Done: 85% (92/108, 16 left, 11 failed) (jobs: 5)
�[0;1mFile "tests/test_dune_same_exe_name.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/1e0f55b611d5335d06b133e345784424/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_dune_same_exe_name.t tests/test_dune_same_exe_name.t.corrected)�[0m
--- tests/test_dune_same_exe_name.t 2024-12-06 10:15:52.107545054 +0000
+++ tests/test_dune_same_exe_name.t.corrected 2024-12-06 10:15:52.107545054 +0000
@@ -36,26 +36,23 @@
$ touch bin/main.ml bin/test.ml bench/main.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ export OPAM_DUNE_LINT_TESTS=y
Check that the missing libraries are detected:
$ opam-dune-lint </dev/null
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from bin]
- "bos" {with-test & >= "1.0"} [from bin]
- "opam-state" {with-test & >= "1.0"} [from bin]
- Note: version numbers are just suggestions based on the currently installed version.
- Run with -f to apply changes in non-interactive mode.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from bin]
- "bos" {with-test & >= "1.0"} [from bin]
- "opam-state" {with-test & >= "1.0"} [from bin]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 11 failed) (jobs: 5)
Done: 85% (92/108, 16 left, 12 failed) (jobs: 4)
Done: 85% (92/108, 16 left, 12 failed) (jobs: 3)
�[0;1mFile "tests/test_dune_copy_install.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/84b3399d35dc24b1e55e5ae26f319e9a/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_dune_copy_install.t tests/test_dune_copy_install.t.corrected)�[0m
--- tests/test_dune_copy_install.t 2024-12-06 10:15:52.144545937 +0000
+++ tests/test_dune_copy_install.t.corrected 2024-12-06 10:15:52.144545937 +0000
@@ -42,71 +42,39 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ export OPAM_DUNE_LINT_TESTS=y
Check that the missing libraries are detected:
$ opam-dune-lint </dev/null
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- zombie.opam: changes needed:
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Run with -f to apply changes in non-interactive mode.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- zombie.opam: changes needed:
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))
- (fmt
- (>= *))
- (ocamlfind
- (>= *))
+ (ocamlfind (>= *))
libfoo))
-
(package
(name zombie)
- (synopsis "Zombie package")
- (depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))))
+ (synopsis "Zombie package"))
Check adding and removing of test markers:
@@ -128,51 +96,33 @@
> EOF
$ dune build @install
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" [from /] (remove {with-test})
- "ocamlfind" [from /] (remove {with-test})
- "bos" {with-test} [from /] (missing {with-test} annotation)
- "opam-state" {with-test} [from /] (missing {with-test} annotation)
- zombie.opam: changes needed:
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state :with-test)
- (bos
- (and
- :with-test
- (>= *)))
- fmt
- (ocamlfind
- (>= *))
+ opam-state
+ (bos (>= *))
+ (fmt :with-test)
+ (ocamlfind (and (>= *) :with-test))
libfoo))
-
(package
(name zombie)
- (synopsis "Zombie package")
- (depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))))
+ (synopsis "Zombie package"))
$ opam-dune-lint
- test.opam: OK
- zombie.opam: OK
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 12 failed) (jobs: 3)
Done: 85% (92/108, 16 left, 13 failed) (jobs: 3)
Done: 85% (92/108, 16 left, 13 failed) (jobs: 2)
�[0;1mFile "tests/test_dune_constraints.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/f23b3612214cbe8d956daf02f471e094/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_dune_constraints.t tests/test_dune_constraints.t.corrected)�[0m
--- tests/test_dune_constraints.t 2024-12-06 10:15:52.187546963 +0000
+++ tests/test_dune_constraints.t.corrected 2024-12-06 10:15:52.187546963 +0000
@@ -36,6 +36,10 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Replace all version numbers with "1.0" to get predictable output.
@@ -44,13 +48,9 @@
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "./test.opam"
- Warning in test: The package has a dune-project file but no explicit dependency on dune was found.
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat test.opam | sed 's/= [^&)}]*/= */g'
# Preserve comments
@@ -62,9 +62,6 @@
depends: [
"ocamlfind" {>= *}
"libfoo"
- "fmt" {>= *}
- "bos" {>= *& with-test}
- "opam-state" {>= *& with-test}
]
$ cat > test.opam << EOF
@@ -81,17 +78,17 @@
> ]
> EOF
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "./test.opam"
- Warning in test: The package tagged dune as a build dependency. Due to a bug in dune (https://github.com/ocaml/dune/issues/2147) this should never be the case. Please remove the {build} tag from its filter.
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat > test.opam << EOF
> # Preserve comments
@@ -144,22 +141,14 @@
> (libraries bos opam-state))
> EOF
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
Check that the missing libraries get added and print all errors before the exit:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- test1.opam: changes needed:
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "./test.opam"
- Wrote "./test1.opam"
- Warning in test: The package tagged dune as a build dependency. Due to a bug in dune (https://github.com/ocaml/dune/issues/2147) this should never be the case. Please remove the {build} tag from its filter.
- Error in test: Your dune-project file indicates that this package requires at least dune 2.7 but your opam file only requires dune >= 1.0. Please check which requirement is the right one, and fix the other.
- Warning in test1: The package tagged dune as a build dependency. Due to a bug in dune (https://github.com/ocaml/dune/issues/2147) this should never be the case. Please remove the {build} tag from its filter.
- Error in test1: Your dune-project file indicates that this package requires at least dune 2.7 but your opam file only requires dune >= 1.0. Please check which requirement is the right one, and fix the other.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 13 failed) (jobs: 2)
Done: 85% (92/108, 16 left, 14 failed) (jobs: 2)
�[0;1mFile "tests/test_dune_stanza_install.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/59ed7e3e61573cdc98a0c5560f273887/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_dune_stanza_install.t tests/test_dune_stanza_install.t.corrected)�[0m
--- tests/test_dune_stanza_install.t 2024-12-06 10:15:52.211547535 +0000
+++ tests/test_dune_stanza_install.t.corrected 2024-12-06 10:15:52.211547535 +0000
@@ -28,51 +28,35 @@
$ touch main.ml test.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ export OPAM_DUNE_LINT_TESTS=y
Check that the missing libraries are detected:
$ opam-dune-lint </dev/null
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Run with -f to apply changes in non-interactive mode.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Check that the missing libraries get added:
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))
- (fmt
- (>= *))
- (ocamlfind
- (>= *))
+ (ocamlfind (>= *))
libfoo))
Check adding and removing of test markers:
@@ -92,33 +76,30 @@
> EOF
$ dune build @install
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ opam-dune-lint -f
- test.opam: changes needed:
- "fmt" [from /] (remove {with-test})
- "ocamlfind" [from /] (remove {with-test})
- "bos" {with-test} [from /] (missing {with-test} annotation)
- "opam-state" {with-test} [from /] (missing {with-test} annotation)
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state :with-test)
- (bos
- (and
- :with-test
- (>= *)))
- fmt
- (ocamlfind
- (>= *))
+ opam-state
+ (bos (>= *))
+ (fmt :with-test)
+ (ocamlfind (and (>= *) :with-test))
libfoo))
$ opam-dune-lint
- test.opam: OK
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 14 failed) (jobs: 2)
Done: 85% (92/108, 16 left, 15 failed) (jobs: 1)
Done: 85% (92/108, 16 left, 15 failed) (jobs: 0)
�[0;1mFile "tests/test_public_lib.t", line 1, characters 0-0:�[0m
�[2m(cd _build/.sandbox/95d49b3dae5476a287dbfe0da3aaa9b1/default && /nix/store/xrpvl6c1pyq7zazqnb41kgshmkr85da1-diffutils-3.10/bin/diff -u tests/test_public_lib.t tests/test_public_lib.t.corrected)�[0m
--- tests/test_public_lib.t 2024-12-06 10:15:52.437552927 +0000
+++ tests/test_public_lib.t.corrected 2024-12-06 10:15:52.437552927 +0000
@@ -36,72 +36,40 @@
$ touch main.ml test.ml lib.ml
$ dune build
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ export OPAM_DUNE_LINT_TESTS=y
Check that the missing libraries are detected:
$ opam-dune-lint </dev/null
- lib.opam: changes needed:
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Run with -f to apply changes in non-interactive mode.
- [1]
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Check that the missing libraries get added:
$ opam-dune-lint -f
- lib.opam: changes needed:
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- test.opam: changes needed:
- "fmt" {>= "1.0"} [from /]
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))
- (fmt
- (>= *))
- (ocamlfind
- (>= *))
+ (ocamlfind (>= *))
libfoo))
-
(package
(name lib)
(synopsis "Lib package")
- (depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))
- sexplib))
+ (depends sexplib))
Check adding and removing of test markers:
@@ -124,52 +92,34 @@
> EOF
$ dune build @install
+ Warning: Cache directories could not be created: Permission denied; disabling
+ cache
+ Hint: Make sure the directory /homeless-shelter/.cache/dune/db/temp can be
+ created
$ opam-dune-lint -f
- lib.opam: changes needed:
- "bos" {with-test & >= "1.0"} [from /]
- "opam-state" {with-test & >= "1.0"} [from /]
- test.opam: changes needed:
- "fmt" [from /] (remove {with-test})
- "ocamlfind" [from /] (remove {with-test})
- "bos" {with-test} [from /] (missing {with-test} annotation)
- "opam-state" {with-test} [from /] (missing {with-test} annotation)
- Note: version numbers are just suggestions based on the currently installed version.
- Wrote "dune-project"
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
$ cat dune-project | sed 's/= [^)}]*/= */g'
(lang dune 2.7)
-
(generate_opam_files true)
-
(package
(name test)
(synopsis "Test package")
(depends
- (opam-state :with-test)
- (bos
- (and
- :with-test
- (>= *)))
- fmt
- (ocamlfind
- (>= *))
+ opam-state
+ (bos (>= *))
+ (fmt :with-test)
+ (ocamlfind (and (>= *) :with-test))
libfoo))
-
(package
(name lib)
(synopsis "Lib package")
- (depends
- (opam-state
- (and
- (>= *)
- :with-test))
- (bos
- (and
- (>= *)
- :with-test))
- sexplib))
+ (depends sexplib))
$ opam-dune-lint
- lib.opam: OK
- test.opam: OK
+ opam-nix fake opam doesn't understand these arguments: config env --sexp
+ Fatal error: exception Failure("run ['opam' 'config' 'env' '--sexp']: exited with 1")
+ [2]
Done: 85% (92/108, 16 left, 15 failed) (jobs: 0)
Expected behavior
It works.
Environment
- Version of the code: ea8b9cb
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels