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

Portable toplevel exit #384

Closed
wants to merge 7 commits into from
Closed

Portable toplevel exit #384

wants to merge 7 commits into from

Conversation

Leonidas-from-XIV
Copy link
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV commented Jul 13, 2022

Experimentation with the #382 PR opened to get the CI to test my changes on multiple versions.

talex5 and others added 2 commits July 8, 2022 10:22
Previously, you just got:

    ocaml-mdx-test: internal error, uncaught exception:
                    Compenv.Exit_with_status(125)
They have to be redirected because by default they write to stdout, but
we capture stderr (and in 4.14 they write to stderr). Unfortunately,
just overwriting them in the directives Hashtbl does not work, since
the ordering of additions is somewhat undefined so they might be
overwritten. A safer way is to create new directives and rewrite those
to be evaluated to them.

Also, `"use"` is a builtin directive, not from findlib so needs to be
excluded to get the error message printed.
`use_output` was added in 4.11, whereas the `use_trace` was removed in
4.13.
The stdlib pre-4.14 defines them to be `ignore`d but they can be made to
throw the error like in 4.14. At least some of them, for which the
underlying functions are exposed in the interface.
OCaml 4.13 introduces a few deprecations that we need to work around.
@Leonidas-from-XIV
Copy link
Collaborator Author

Pushed the changes to #382 so this can be safely closed.

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.

2 participants