Skip to content
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

Fix the support of OCaml 5 #21

Merged
merged 2 commits into from
Dec 23, 2022
Merged

Fix the support of OCaml 5 #21

merged 2 commits into from
Dec 23, 2022

Conversation

dinosaure
Copy link
Member

OCaml 5 has a new random number generator which catches a case where we want to evaluate a branch with %u. This PR implements the %u into our formatter.

@dinosaure dinosaure merged commit 69b871d into master Dec 23, 2022
@dinosaure dinosaure deleted the fix-ocaml-5 branch December 23, 2022 11:37
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this pull request Jan 30, 2023
Upstream fix exists: mirage/conan#21 and
`conan.0.0.2` has been marked as unavailable on 5.0, so this PR follows
suit for 0.1.

The test fail due to %u:

    #=== ERROR while compiling conan-cli.0.0.1 ====================================#
    # context              2.2.0~alpha~dev | linux/x86_64 | ocaml-base-compiler.5.0.0 | file:///home/opam/opam-repository
    # path                 ~/.opam/5.0/.opam-switch/build/conan-cli.0.0.1
    # command              ~/.opam/opam-init/hooks/sandbox.sh build dune runtest -p conan-cli -j 255
    # exit-code            1
    # env-file             ~/.opam/log/conan-cli-7-51ad28.env
    # output-file          ~/.opam/log/conan-cli-7-51ad28.out
    ### output ###
    <many successfully passed tests snipped>
    # File "fuzz/dune", line 6, characters 0-158:
    #  6 | (rule
    #  7 |  (alias runtest)
    #  8 |  (deps
    #  9 |   fuzz.exe
    # 10 |   (source_tree ../database)
    # 11 |   (env_var CONAN))
    # 12 |  (action
    # 13 |   (setenv
    # 14 |    CONAN
    # 15 |    ../database
    # 16 |    (run %{exe:fuzz.exe}))))
    # (cd _build/default/fuzz && ./fuzz.exe)
    <more lines cut>
    # "DOS executable (COM, 0x8C-variant) PGP symmetric key encrypted data -" ("application/x-dosexec")
    # Found a solution for the given input: "OpenPGP Public Key".
    # lint (assert false / exception): FAIL
    #
    # When given the input:
    #
    #     "CI\175\226j\154\237\132&\140\1974\004O\018\227\209\237ZGm\202\202D\127\020\180;\019\173Z\187\151%\149\223+\244n\156c\027\148"
    #
    # the test threw an exception:
    #
    #     Invalid_argument("Invalid formatter u")
    #     Raised at Stdlib.invalid_arg in file "stdlib.ml", line 30, characters 20-45
    #     Called from Conan__Fmt.go in file "src/fmt.ml", line 618, characters 24-44
    #     Called from Conan__Fmt.parse in file "src/fmt.ml" (inlined), line 624, characters 2-17
    #     Called from Conan__Fmt.ty_of_string in file "src/fmt.ml", line 638, characters 18-30
    #     Called from Conan__Tree.key_of_ty in file "src/tree.ml", line 195, characters 21-50
    #     Called from Conan__Tree.format_of_ty in file "src/tree.ml", line 242, characters 18-38
    #     Called from Conan__Process.process_fmt in file "src/process.ml", line 16, characters 31-51
    #     Called from Conan__Process.process.(fun) in file "src/process.ml", line 53, characters 25-54
    #     Called from Conan__Process.descending_walk.iter in file "src/process.ml", line 131, characters 8-68
    #     Called from Conan__Process.descending_walk.iter.(fun) in file "src/process.ml", line 134, characters 12-69
    #     Called from Conan__Process.descending_walk.iter.(fun) in file "src/process.ml", line 134, characters 12-69
    #     Called from Conan__Process.descending_walk in file "src/process.ml" (inlined), line 171, characters 2-64
    #     Called from Conan_string.run in file "string/conan_string.ml", line 143, characters 25-79
    #     Called from Dune__exe__Fuzz.(fun) in file "fuzz/fuzz.ml", line 33, characters 8-38
    #     Called from Crowbar.gen_apply.go.(fun) in file "src/crowbar.ml", line 325, characters 16-19
dinosaure added a commit to dinosaure/opam-repository that referenced this pull request Apr 28, 2023
…cli (0.0.3)

CHANGES:

- Fix the OCaml 5 support (@dinosaure, @Leonidas-from-XIV, mirage/conan#21)
- Apply `ocamlformat.0.24.1` (@dinosaure, mirage/conan#22)
- Fix lower bounds (@gridbugs, mirage/conan#23)
- Add `-p` name to dune install invocation (@reynir, mirage/conan#24, mirage/conan#19)
- Fix the MacOS support (@dinosaure, mirage/conan#25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant