-
Notifications
You must be signed in to change notification settings - Fork 172
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 4.0.0 breaking changes notice #453
Comments
Hi! Random new-OCaml-learner here, coming from the JavaScript/Node world. Just came by to say this careful, premeditated handling of breaking changes is extremely heartening, and makes me 10x more excited to join the OCaml community. Keep up the good work! |
Well, thanks :) |
Here are additional breaking changes, also planned for the future 4.0.0, announced and prepared by the recent 3.2.0 release. To give proper time to adapt, 4.0.0 will be released in three months, around March 2018. Each breaking change is detailed below, with instructions on how to prepare for it. I will cc the maintainers of affected opam packages after 3.2.0 becomes installable. I've listed the names of opam packages potentially affected under each notice. See if your package is in the lists. The scheduled breaking changes are still proposals. If you think anything below is a really bad idea, please don't hesitate to object or otherwise comment :) The three-month window is for adaptation and discussion :)
|
Please see the above comment, with instructions on how to adapt to future changes in Lwt 4.0.0, which will be made in three months. Mostly, adapting will involve adding new dependencies to opam files, due to changed packaging of Lwt helper libraries. |
@aantron can you list the affected packages? What command do you use to estimate what packages are impacted by this change? Is this something like:
|
@gildor478 The affected packages for what? Each specific change lists the affected packages under the description already. Are you referring to something else? The command is
|
@aantron Thanks. The list of affected packages by breaking changes is perfect. I have received first the comment where I was CCed and I was wondering how to act on it. It looked like a long list of sorted names. You may want to improve the CC message with something like @gildor478 for debian-formats, This can help people to know what they should change. Anyway, thanks. I'll change ocaml-debian-formats accordingly. |
Thanks. I'll probably have to do that for the next time we have breaking changes. |
Summary: ocamlbuild was spewing due to an ocamlfind warning: findlib: [WARNING] Interface ppx_lwt.cmi occurs in several directories: /home/glevi/.opam/4.05.0/lib/lwt_ppx, /home/glevi/.opam/4.05.0/lib/lwt The fix is to set OCAMLFIND_IGNORE_DUPS_IN to the directories in which we should ignore duplicates [see docs](https://linux.die.net/man/5/findlib.conf). [In lwt 4.0.0, they'll remove ppx_lwt from the lwt package.](ocsigen/lwt#453) Reviewed By: samwgoldman Differential Revision: D6938579 fbshipit-source-id: 5b6106cb5b8b37c7b53257a32d318339905c876a
The |
That's a shame. Sounds like this change would have made |
The majority of big projects, that are serious stakeholders of Lwt, will then may choose to continue to use Lwt 3.x, that will eventually lead to a nasty schism, like gnome 2.x vs gnome 3.x, etc. This will, in the best case scenario, double the support burden, and, in the worst one will make many packages uninstallable, or create yet another branch in the already too complex "which async library to use" decision tree. Given that in the real life, the noted problem with the bind semantics, is not often observable (if at all), I don't think that we should make this step. Also, I would suggest everyone to refrain yourself from using exceptions together with Lwt (or any other async computations) and use variants to denote failed computations. Under such model, the bind function has perfectly fine and sound semantics. |
We may still be able to make the However, I'm not sure what the ultimate value of this would be, given it's still work for users, it can't be flagged statically, and the semantic problem is not a problem for users in practice. All the semantic problem means is for developers of Lwt, we have to do extra work when editing any core Lwt API, to ensure that it interacts safely with I agree strongly with @ivg about avoiding exceptions. Reflecting a lot on experience with Lwt and JS promises, my overall opinion is that rejections and asynchronous exceptions are both pretty ill-conceived mechanisms, almost as poor as cancelation. While it would be nice if these things worked well, because exceptions need to go somewhere and we don't want to handle them manually each time, each actual design that I've seen or come up with so far seems to produce undesirable consequences. As @ivg points out, even though Lwt supports rejection, a user that is aware of its problems is likely to be using explicit error handling, in which case the
|
Async provides an |
We could eventually do that. It should be very easy to get both styles of API exposed. The changes from #500 support this. |
Closing this, as 4.0.0 is now merged into opam (ocaml/opam-repository#11708). See also the main announcement on Discourse. Further discussion, questions, etc., are welcome, of course :) |
Great work! However, the documentation and tutorials should reflect the new project structure as well, especially with regard to lwt.ppx versus lwt_ppx. |
Lwt 4.0.0 will be released
towards the end of 2017in March 2018 with minor breaking changes to packaging, and perhaps several APIs. Hopefully, there will be less breakage than in 3.0.0.The current release, 3.1.0, prepares to delete some modules. Another planned release, 3.2.0, will schedule additional breaking changes for 4.0.0. A comment will be added to this issue when 3.2.0 is released, with details and instructions about those additional plans.
lwt.simple-top
(Delete simple-top #371). This has been deprecated for years, in favor ofutop
. It has no users in OPAM, and users found in a GitHub search have already been notified.Lwt_chan
(packagelwt.unix
) (Delete Lwt_chan in 4.0.0 #441). This has been deprecated for nine years in favor ofLwt_io
, which subsumes it completely. GitHub and OPAM package maintainers have been notified in the linked issue.The text was updated successfully, but these errors were encountered: