-
Notifications
You must be signed in to change notification settings - Fork 80
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
Make alcotest-lwt compatible with jsoo #348
base: main
Are you sure you want to change the base?
Conversation
gentle ping |
Thanks @hhugo. I'll review this (& go through backlog elsewhere) this weekend 👍 |
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.
Thanks for this PR.
The changes are making sense to me. However I'm afraid of the breaking changed introduced by the removal of the lwt.unix
dependency. I'll try to investigate and see which packages are involved.
I have added a comment about alcotest_test_helper
, we should explain somewhere why it is used instead of Lwt_main.run
.
Can you rebase on top of main
and add a changelog entry ?
@@ -7,5 +7,4 @@ | |||
fmt | |||
alcotest.engine | |||
alcotest | |||
(re_export lwt.unix) ;; Unused dependency added for convenience to consumers |
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.
This looks like a breaking change.. I don't know how many packages depend on lwt.unix being re-exported though.
@@ -5,11 +5,11 @@ let free () = | |||
let test_lwt switch () = | |||
Lwt_switch.add_hook (Some switch) free; | |||
Lwt.async (fun () -> failwith "All is broken"); | |||
Lwt_unix.sleep 10. |
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.
What was the reason for this 10 seconds sleep ?
@@ -0,0 +1,7 @@ | |||
let rec wakeup_until_resolved p = |
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.
It should be explained somewhere that to make the tests work with js we use a custom lwt event loop.
Either in CONTRIBUTING.md or in alcotest_test_helper.ml
.
@hhugo what's the status of this? |
I don't have time to spend on this and no longer have a need for this at the moment. Feel free to close or takeover the PR |
No description provided.