Skip to content

Portable toplevel exit #384

Closed
Leonidas-from-XIV wants to merge 7 commits intorealworldocaml:mainfrom
Leonidas-from-XIV:toplevel-exit
Closed

Portable toplevel exit #384
Leonidas-from-XIV wants to merge 7 commits intorealworldocaml:mainfrom
Leonidas-from-XIV:toplevel-exit

Conversation

@Leonidas-from-XIV
Copy link
Copy Markdown
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
Copy Markdown
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