Skip to content

[new release] alcotest (5 packages) (1.9.0)#27617

Merged
samoht merged 2 commits intoocaml:masterfrom
samoht:release-alcotest-1.9.0
Mar 18, 2025
Merged

[new release] alcotest (5 packages) (1.9.0)#27617
samoht merged 2 commits intoocaml:masterfrom
samoht:release-alcotest-1.9.0

Conversation

@samoht
Copy link
Copy Markdown
Member

@samoht samoht commented Mar 13, 2025

Alcotest is a lightweight and colourful test framework

CHANGES:

CHANGES:

- Add `seq`, a testable for `Seq.t` and `contramap` (mirage/alcotest#412 @xvw)
- Expose the `V1.Skip` exception (mirage/alcotest#415, mirage/alcotest#416, @Khady)
- BREAKING FIX: `match_raises` now expects the user-defined function to return
  true for expected exceptions. Previously false was interpreted as an
  expected exception. (mirage/alcotest#418, mirage/alcotest#419, @psafont)
@samoht
Copy link
Copy Markdown
Member Author

samoht commented Mar 13, 2025

The windows check is failing with:

#=== ERROR while compiling core_unix.v0.17.0 ==================================#
  # context     2.3.0 | win32/x86_64 | ocaml.5.3.0 | file://D:/a/opam-repository/opam-repository
  # path        D:\opamroot\default\.opam-switch\build\core_unix.v0.17.0
  # command     D:\opamroot\default\bin\dune.exe build -p core_unix -j 3
  # exit-code   1
  # env-file    D:\opamroot\log\core_unix-5280-26c5dd.env
  # output-file D:\opamroot\log\core_unix-5280-26c5dd.out
  ### output ###
  # [...]
  # syslog_stubs.c:2:10: fatal error: syslog.h: No such file or directory
  #     2 | #include <syslog.h>
  #       |          ^~~~~~~~~~
  # compilation terminated.
  # File "lock_file_blocking/src/dune", lines 9-13, characters 0-96:
  #  9 | (rule
  # 10 |  (targets config.h)
  # 11 |  (deps)
  # 12 |  (action
  # 13 |   (bash "cp %{lib:jst-config:config.h} %{targets}")))
  # (cd _build/default/lock_file_blocking/src && D:\opamroot\.cygwin\root\bin\bash.exe -e -u -o pipefail -c "cp D:\opamroot\default\lib\jst-config\config.h config.h")
  # cp: cannot stat 'D:opamrootdefaultlibjst-configconfig.h': No such file or directory

@dra27 @kit-ty-kate @mseri -- what's the policy for Windows builds in the repo now? Should I add a available: !windows in the opam file of core_unix?

@mseri
Copy link
Copy Markdown
Member

mseri commented Mar 13, 2025

We don't touch windows unless we are sure what is the right constraint, since being able to build a package depends a lot on the precise windows configuration. I think not available on the whole os-family windows is too strong, are we sure it does not work on cygwin or cygwinports on win32?

@shonfeder
Copy link
Copy Markdown
Member

There is an issue for windows support in core_unix janestreet/core_unix#9

@samoht
Copy link
Copy Markdown
Member Author

samoht commented Mar 13, 2025

The lower-bound issues should be fixed by #27616

@mseri
Copy link
Copy Markdown
Member

mseri commented Mar 15, 2025

What about

#=== ERROR while compiling mirage-kv-mem.4.0.0 ================================#
# context              2.4.0~alpha1~dev | linux/x86_64 | ocaml-base-compiler.5.3.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.3/.opam-switch/build/mirage-kv-mem.4.0.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune runtest -p mirage-kv-mem -j 255
# exit-code            1
# env-file             ~/.opam/log/mirage-kv-mem-7-94b890.env
# output-file          ~/.opam/log/mirage-kv-mem-7-94b890.out
### output ###
# (cd _build/default && /home/opam/.opam/5.3/bin/ocamlc.opt -w -40 -g -bin-annot -bin-annot-occurrences -I test/.test_pure.eobjs/byte -I /home/opam/.opam/5.3/lib/alcotest -I /home/opam/.opam/5.3/lib/alcotest/engine -I /home/opam/.opam/5.3/lib/alcotest/stdlib_ext -I /home/opam/.opam/5.3/lib/astring -I /home/opam/.opam/5.3/lib/cmdliner -I /home/opam/.opam/5.3/lib/fmt -I /home/opam/.opam/5.3/lib/fmt/cli -I /home/opam/.opam/5.3/lib/fmt/tty -I /home/opam/.opam/5.3/lib/lwt -I /home/opam/.opam/5.3/lib/mirage-kv -I /home/opam/.opam/5.3/lib/mirage-ptime/unix -I /home/opam/.opam/5.3/lib/ocaml/unix -I /home/opam/.opam/5.3/lib/optint -I /home/opam/.opam/5.3/lib/ptime -I /home/opam/.opam/5.3/lib/ptime/clock -I /home/opam/.opam/5.3/lib/re -I /home/opam/.opam/5.3/lib/seq -I /home/opam/.opam/5.3/lib/stdlib-shims -I /home/opam/.opam/5.3/lib/uutf -I src/.mirage_kv_mem.objs/byte -no-alias-deps -o test/.test_pure.eobjs/byte/test_pure.cmo -c -impl test/test_pure.ml)
# File "test/test_pure.ml", line 132, characters 25-28:
# 132 |               (Pure.size map key_a))
#                                ^^^
# Error: The value "map" has type
#          "('a -> 'b) -> 'b Alcotest.testable -> 'a Alcotest.testable"
#        but an expression was expected of type "Pure.t" = "Mirage_kv_mem.Pure.t"

and


#=== ERROR while compiling junit_alcotest.2.1.0 ===============================#
# context              2.4.0~alpha1~dev | linux/x86_64 | ocaml-base-compiler.4.14.2 | file:///home/opam/opam-repository
# path                 ~/.opam/4.14/.opam-switch/build/junit_alcotest.2.1.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p junit_alcotest -j 71
# exit-code            1
# env-file             ~/.opam/log/junit_alcotest-8-89f983.env
# output-file          ~/.opam/log/junit_alcotest-8-89f983.out
### output ###
# (cd _build/default && /home/opam/.opam/4.14/bin/ocamlc.opt -w -40 -safe-string -short-paths -g -bin-annot -I alcotest/.junit_alcotest.objs/byte -I /home/opam/.opam/4.14/lib/alcotest -I /home/opam/.opam/4.14/lib/alcotest/engine -I /home/opam/.opam/4.14/lib/alcotest/stdlib_ext -I /home/opam/.opam/4.14/lib/astring -I /home/opam/.opam/4.14/lib/cmdliner -I /home/opam/.opam/4.14/lib/fmt -I /home/opam/.opam/4.14/lib/fmt/cli -I /home/opam/.opam/4.14/lib/fmt/tty -I /home/opam/.opam/4.14/lib/junit -I /home/opam/.opam/4.14/lib/ptime -I /home/opam/.opam/4.14/lib/ptime/clock -I /home/opam/.opam/4.14/lib/re -I /home/opam/.opam/4.14/lib/seq -I /home/opam/.opam/4.14/lib/stdlib-shims -I /home/opam/.opam/4.14/lib/tyxml -I /home/opam/.opam/4.14/lib/tyxml/functor -I /home/opam/.opam/4.14/lib/uutf -intf-suffix .ml -no-alias-deps -o alcotest/.junit_alcotest.objs/byte/junit_alcotest.cmo -c -impl alcotest/junit_alcotest.ml)
# File "alcotest/junit_alcotest.ml", line 37, characters 6-32:
# 37 |     | Alcotest_engine__Core.Skip ->
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: Unbound constructor Alcotest_engine__Core.Skip
# (cd _build/default && /home/opam/.opam/4.14/bin/ocamlopt.opt -w -40 -safe-string -short-paths -g -I alcotest/.junit_alcotest.objs/byte -I alcotest/.junit_alcotest.objs/native -I /home/opam/.opam/4.14/lib/alcotest -I /home/opam/.opam/4.14/lib/alcotest/engine -I /home/opam/.opam/4.14/lib/alcotest/stdlib_ext -I /home/opam/.opam/4.14/lib/astring -I /home/opam/.opam/4.14/lib/cmdliner -I /home/opam/.opam/4.14/lib/fmt -I /home/opam/.opam/4.14/lib/fmt/cli -I /home/opam/.opam/4.14/lib/fmt/tty -I /home/opam/.opam/4.14/lib/junit -I /home/opam/.opam/4.14/lib/ptime -I /home/opam/.opam/4.14/lib/ptime/clock -I /home/opam/.opam/4.14/lib/re -I /home/opam/.opam/4.14/lib/seq -I /home/opam/.opam/4.14/lib/stdlib-shims -I /home/opam/.opam/4.14/lib/tyxml -I /home/opam/.opam/4.14/lib/tyxml/functor -I /home/opam/.opam/4.14/lib/uutf -intf-suffix .ml -no-alias-deps -o alcotest/.junit_alcotest.objs/native/junit_alcotest.cmx -c -impl alcotest/junit_alcotest.ml)
# File "alcotest/junit_alcotest.ml", line 37, characters 6-32:
# 37 |     | Alcotest_engine__Core.Skip ->
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: Unbound constructor Alcotest_engine__Core.Skip

Are they related to this new release?

@Khady
Copy link
Copy Markdown
Contributor

Khady commented Mar 16, 2025

Second one seems to be yes. Junit_alcotest should get a constraint to not work with the latest Alcotest

@tmcgilchrist
Copy link
Copy Markdown
Contributor

The first one needs "alcotest" {with-test < "1.9.0"} added to opam file for that package across https://github.com/ocaml/opam-repository/tree/master/packages/mirage-kv-mem.

mseri added a commit to mseri/opam-repository that referenced this pull request Mar 17, 2025
Fails with Error: Unbound constructor Alcotest_engine__Core.Skip

See ocaml#27617 (comment)

Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
mseri added a commit to mseri/opam-repository that referenced this pull request Mar 17, 2025
Fails with

    Error: The value "map" has type
       "('a -> 'b) -> 'b Alcotest.testable -> 'a Alcotest.testable"
     but an expression was expected of type "Pure.t" = "Mirage_kv_mem.Pure.t"

See ocaml#27617 (comment)

Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
@mseri
Copy link
Copy Markdown
Member

mseri commented Mar 17, 2025

Thanks, I'm sending a separate PR

@mseri
Copy link
Copy Markdown
Member

mseri commented Mar 17, 2025

I think with the latest PR we are covering all the new failures. I will migrate Seq asap

Comment thread packages/alcotest-js/alcotest-js.1.9.0/opam
@mseri
Copy link
Copy Markdown
Member

mseri commented Mar 17, 2025

I think with this it should be ready for merge

@samoht samoht merged commit f92e43c into ocaml:master Mar 18, 2025
1 of 3 checks passed
@tmcgilchrist
Copy link
Copy Markdown
Contributor

Thank you !!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants