WIP: Transition from Lwt to Eio
On top of https://github.com/ocsigen/ocsigenserver/pull/267 https://github.com/ocsigen/ocsigenserver/pull/268 https://github.com/ocsigen/ocsigenserver/pull/266
The first commit are the changes automatically made by this tool: https://github.com/Julow/lwt-to-direct-style with the following options:
lwt-to-direct-style --migrate --eio-sw-as-fiber-var=Ocsigen_lib.current_switch --eio-env-as-fiber-var=Ocsigen_lib.env
The second commit makes all the manual changes required to make the server works. It does many things and I plan to split it up into smaller commits with better messages.
The tests run but I've not tested this in a real application yet. There are no compatible Eliom version yet.
Important work remain to be done:
-
[ ] TLS is not implemented by
cohttp-eio. It was previously done byconduit, which doesn't have a eio version yet. -
[ ] Eio's
Switchmechanism should be used to make sure resources are scoped to a request. -
[x]
Staticmodcan't access files outside of the current directory anymore. This means that it won't follow symlinks to files outside of the current directory. Whether this breaks applications should be checked. -
[ ] The server no longer listens to IPv6 when started with
~ports:[ `All ]. -
[ ] The code for querying the environment and current switch could be improved.