lwt icon indicating copy to clipboard operation
lwt copied to clipboard

add the `lwt_direct` package, for direct-style control flow

Open c-cube opened this issue 5 months ago • 4 comments

This is a WIP, it needs testing, but the fundamentals are here.

c-cube avatar Jul 08 '25 14:07 c-cube

I added some tests!

c-cube avatar Jul 11 '25 02:07 c-cube

5 |  (build_if (>= %{ocaml_version} "5.0"))
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: 'build_if' is only available since version 3.9 of the dune language.

:cry: not sure how to make CI happy on OCaml 4 .xx at this rate…

edit: worked by doing the test with a manual rule

c-cube avatar Jul 11 '25 03:07 c-cube

merged the branch into lwt-6, which I want to use for the alpha releases.

i want to try and keep master clean

raphael-proust avatar Jul 15 '25 09:07 raphael-proust

I tested alpha01 and got a segfault (it didn't in alpha00 but cohttp didn't seem to work):

Thread 2 "opam-health-serve-ng" received signal SIGSEGV, Segmentation fault.                                   
[Switching to LWP 4945]                                                                                   
0x00005555561aa77e in lwt_unix_send_notification (domain_id=0, id=2147482650) at lwt_unix_stubs.c:577     
warning: 577    lwt_unix_stubs.c: No such file or directory                                               
(gdb) bt                                                                                                  
#0  0x00005555561aa77e in lwt_unix_send_notification (domain_id=0, id=2147482650) at lwt_unix_stubs.c:577 
#1  0x00005555561aae7b in execute_job (job=job@entry=0x7fffe78c1410) at lwt_unix_stubs.c:983              
#2  0x00005555561aaf0d in worker_loop (data=<optimized out>) at lwt_unix_stubs.c:1071                     
#3  0x00007ffff7fbf9d2 in start (p=0x7fffe78b9ad8) at src/thread/pthread_create.c:207                     
#4  0x00007ffff7fc1314 in __clone () at src/thread/x86_64/clone.s:22                                      
Backtrace stopped: frame did not save the PC                                                              
(gdb)                                                                                                     

In case it's my fault you can find the code in https://github.com/kit-ty-kate/opam-health-check-ng/pull/6

kit-ty-kate avatar Jul 30 '25 23:07 kit-ty-kate