-
Notifications
You must be signed in to change notification settings - Fork 176
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
Lwt_result.catch takes a function as parameter now #965
Conversation
I'm fine with your proposed change, thanks. |
dune-rpc-lwt isn't used by anyone yet, so I'm fine with the breaking change. |
This is a breaking change, that has a considerable impact on internal code we have. |
@kohlivarun5 I did have concerns about changing the type like this. Thanks for the input! Out of curiosity: How much do you use I'll try to find an appropriate new name to introduce. Any suggestion is welcome. |
|
I'm fine with the proposed change. It does mean that users of the Also fine wrt. |
We use
I am also unsure about a new name, maybe |
@kohlivarun5 I've made a version that deprecates (but does not remove) the existing function. Let me know if you foresee any issue with releasing these changes as a minor bump. Also, thank you for letting me know about library usage. :) |
The |
I looked at this again, and I was a bit mistaken before. I thought we were deprecating So, we should be okay if you replace Apologies for the confusion here |
Thanks for looking @kohlivarun5. I'm in favour, similar to @MisterDA to just redefine |
A new major version seems reasonable to me. Especially bc there are several PRs related to exception management. I'll go towards that. |
b9ba8c1
to
7e8e07e
Compare
This PR is a work-in-progress. It should probably use a
deprecated
annotation instead, and introduce a new function to replace the existing one. Although:The name
catch
is a good name for what the function does.It seems like the function is barely used at all. So I could just open pull requests on the handful of packages that use it.
dune
uses this function. Specifically otherlibs/dune-rpc-lwt/src/dune_rpc_lwt.ml has one occurrence of it. Ping @rgrinbergopenvpn
uses this function. Specifically openvpn_client_lwt.ml has two occurrences of it. Ping @hannesmocaml-zmq
uses this function. Specifically zmq-lwt/src/deferred.ml has one occurrence of it. Ping @andersfugmannaws-s3
uses this function. Specifically, aws-s3-lwt/io.ml has one occurrence of it. Ping @andersfugmann@rgrinberg @hannesm @andersfugmann would you be ok with this breaking change of interface if I open a PR on your repos to adapt your code to match? Or do you need to stay compatible with multiple versions of Lwt for some packaging or dependency management reason?