-
Notifications
You must be signed in to change notification settings - Fork 1.2k
restore caml_process_pending_actions_exn #13304
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
restore caml_process_pending_actions_exn #13304
Conversation
gadmm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the need for a helper function caml_result_get_encoded_exception. I'd rather see it inlined in the function. But it's up to you.
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I made a mistake when introducing caml_process_pending_actions_res (ocaml#13013), currently in trunk `caml_process_pending_actions_exn` is exported in signals.h but its implementation is removed. This function is not CAML_INTERNALS, and Coq uses it. To restore this function I reintroduced a helper function to transform `caml_result` values back into encoded exception (earlier ocaml#13013 designs had this). It is named `caml_result_get_encoded_exception`, in fail.h, CAML_INTERNALS-only.
3b36e72 to
65eaf62
Compare
|
This needs a maintainer approach, maybe @Octachron? |
| #ifdef CAML_INTERNALS | ||
| // internals only, provided for backward-compatibility | ||
| Caml_inline value caml_result_get_encoded_exception( | ||
| struct caml_result_private result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this function supposed to be part of the puvlic API of caml_result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is CAML_INTERNALS only. It is only useful in transition scenarios, but I suspect that we may want to use it in more parts of the runtime occasionally (which is why factored it out of caml_process_pending_actions_exn).
Octachron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am green-ticking on behalf of @gadmm and @dustanddreams .
I made a mistake when introducing
caml_process_pending_actions_res(#13013), currently in trunkcaml_process_pending_actions_exnis exported in signals.h but its implementation is removed.This function is not CAML_INTERNALS, and Coq uses it.
To restore this function I reintroduced a helper function to transform
caml_resultvalues back into encoded exception (earlier #13013 designs had this). It is namedcaml_result_get_encoded_exception, in fail.h, CAML_INTERNALS-only.