Repository navigation
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
deprecatedannotation instead, and introduce a new function to replace the existing one. Although:The name
catchis 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.
duneuses this function. Specifically otherlibs/dune-rpc-lwt/src/dune_rpc_lwt.ml has one occurrence of it. Ping @rgrinbergopenvpnuses this function. Specifically openvpn_client_lwt.ml has two occurrences of it. Ping @hannesmocaml-zmquses this function. Specifically zmq-lwt/src/deferred.ml has one occurrence of it. Ping @andersfugmannaws-s3uses 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?