Skip to content

Conversation

@jmid
Copy link
Member

@jmid jmid commented Aug 11, 2025

Spotted on #28302: mutaml will fail an installation --with-test on ppxlib 0.34 and above:

#=== ERROR while compiling mutaml.0.3 =========================================#
# context              2.3.0 | linux/x86_64 | ocaml-base-compiler.4.14.2 | file:///home/opam/opam-repository
# path                 ~/.opam/4.14/.opam-switch/build/mutaml.0.3
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p mutaml -j 255 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/mutaml-6-bc66eb.env
# output-file          ~/.opam/log/mutaml-6-bc66eb.out
### output ###
# (cd _build/default/examples/testproj-1-module && ./ounittest.exe)
# ....
# Ran: 4 tests in: 0.11 seconds.
# OK
# (cd _build/default/examples/testproj-2-modules/test && ./ounittest.exe)
# ..
# Ran: 2 tests in: 0.11 seconds.
# OK
# File "test/negative-tests/ppx-negtests.t", line 1, characters 0-0:
# /usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/negative-tests/ppx-negtests.t _build/default/test/negative-tests/ppx-negtests.t.corrected
# diff --git a/_build/default/test/negative-tests/ppx-negtests.t b/_build/default/test/negative-tests/ppx-negtests.t.corrected
# index 2e7b62b..54c0b5e 100644
# --- a/_build/default/test/negative-tests/ppx-negtests.t
# +++ b/_build/default/test/negative-tests/ppx-negtests.t.corrected
# @@ -257,6 +257,9 @@ Instrument and check that it was received
#      -styler                     Code styler
#      -output-metadata FILE       Where to store the output metadata
#      -corrected-suffix SUFFIX    Suffix to append to corrected files
# +    -keywords <version+list>    Set keywords according to the version+list specification. Allows using a set of keywords different from the one of the current compiler for backward compatibility.
# +    --keywords <version+list>   Same as -keywords
# +    --use-compiler-pp Force     migrating the AST back to the compiler's version before printing it as source code using the compiler's Pprintast utilities.
#      -loc-filename <string>      File name to use in locations
#      -reserve-namespace <string> Mark the given namespace as reserved
#      -no-check                   Disable checks (unsafe)

This is not a serious error though - just a diff caused by additional options added to ppxlib.0.34 (and above), which shouldn't otherwise prevent using the package with never ppxlibs.
This PR therefore sets an upper ppxlib bound when running with-test using the old Boolean trick of
encoding an implication with-test => bound as not with-test \/ bound
.
This should hopefully take care of one more red CI light... 🙂 🤞

@jmid
Copy link
Member Author

jmid commented Aug 11, 2025

CI summary:

  • conf-diffutils fail on opensuse as it conflicts with their busybox-diffutils
  • two arm32 workflows fail with No space left on device

None of these were caused by the added conditional bound. As such this should be good to go.

@jmid
Copy link
Member Author

jmid commented Aug 11, 2025

Hm. I just spotted in packages/ppx_deriving_yojson/ppx_deriving_yojson.3.10.0/opam
that a similar with-test boundary for yojson is expressed as two separate constraints:

depends: [
  "ocaml" {>= "4.05.0"}
  "dune" {>= "1.0"}
  "yojson" {>= "1.6.0"}
  "yojson" {with-test & < "3"}
  ...
]

That was added in #27956 by a suggestion of @mseri.
Perhaps splitting would manifest in an actionable upper bound when running with-test and thus avoid the current somewhat unsatisfying bailing out? 🤔

5.3
  ✔️ mutaml.0.3 (passed)
     ✔️lower-bounds (passed)
     - tests (failed: [SKIP] Package not available)

@jmid jmid force-pushed the mutaml-ppxlib-bound branch from ede966a to 500e7ee Compare August 11, 2025 21:34
@jmid
Copy link
Member Author

jmid commented Aug 11, 2025

The outcome is the same, but the constraint reads cleaner.
The old commit has been cleaned-up and I've force-pushed the replacement commit.

@dinosaure
Copy link
Contributor

Waiting for the CI but it seems good for me.

@jmid
Copy link
Member Author

jmid commented Aug 12, 2025

Something is fishy with the CI - polite ping @mtelvers.
The remaining 'yellow` jobs have all timed out (last night), yet seem stuck without reporting their status.
I thus pressed the 'Cancel' button this morning, resulting in these messages for all of the workflows:

2025-08-11 23:34.48: Cancelling: Timeout (120.0 minutes)
2025-08-12 06:18.16: cancel("Cancelled by user"): already cancelled ("Timeout (120.0 minutes)")!

Notice the difference in the timestamps: This was ~7 hours later without a workflow status having propagated... 🤔

@dinosaure
Copy link
Contributor

Ok, so let's merge. I see an error on opensuse but it's related to diffutils.

@dinosaure dinosaure merged commit f12b121 into ocaml:master Aug 13, 2025
2 of 3 checks passed
@jmid jmid deleted the mutaml-ppxlib-bound branch August 13, 2025 09:39
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.

2 participants