-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Almost complete port to Eio #254
Draft
Willenbrink
wants to merge
44
commits into
aantron:master
Choose a base branch
from
Willenbrink:eio
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Commits on Apr 2, 2023
-
It segfaults under multicore: see savonet/ocaml-ssl#76
Configuration menu - View commit details
-
Copy full SHA for 6f608d0 - Browse repository at this point
Copy the full SHA 6f608d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef7d7be - Browse repository at this point
Copy the full SHA ef7d7beView commit details
Commits on Apr 3, 2023
-
This is a proof-of-concept port of Dream to Eio. Most of the public API in dream.mli has been changed to no longer use promises and the main tutorial examples (`[1-9a-l]-*`) have been updated and are working. The documentation mostly hasn't been updated. Internally, it's still using Lwt in many places, using Lwt_eio to convert between them. The main changes are: - User code doesn't need to use lwt (or lwt_ppx) now for Dream stuff. However, the SQL example still uses lwt for the Caqti callback. - Dream servers must be wrapped in an `Eio_main.run`. Unlike Lwt, where you can somewhat get away with running other services with `Lwt.async` before `Dream.run` and relying on the mainloop picking them up later, everything in Eio must be started from inside the loop. Personally, I think this is clearer and less magical, making it obvious that Dream can run alongside other Eio code, but obviously Dream had previously made the choice to hide the `Lwt_main.run` by default. - `Dream.run` now takes an `env` argument (from `Eio_main.run`), granting it access to the environment. At present, it uses this just to start `Lwt_eio`, but once fully converted it should also use it to listen on the network and read certificates, etc. Error handling isn't quite right yet. Ideally, we'd create a new Eio switch for each new connection, and that would get the errors. However, connection creation is currently handled by Lwt. Also, it still tries to attach the request ID to the Lwt thread for logging, which likely won't work. I should provide a way to add log tags to fibres in Eio. Note: `example/k-websocket` logs `Async exception: (Failure "cannot write to closed writer")`. It does that on `master` with Lwt too.
Configuration menu - View commit details
-
Copy full SHA for 6c4ed2d - Browse repository at this point
Copy the full SHA 6c4ed2dView commit details -
Use Eio to accept network connections
After accepting a connection we convert it to a Lwt_unix.file_descr and continue as before. The `stop` argument has gone, as you can now just cancel the Eio fibre instead. Note that this will cancel all running requests too (unlike the previous behaviour, where it only stopped accepting new connections).
Configuration menu - View commit details
-
Copy full SHA for 5c276c5 - Browse repository at this point
Copy the full SHA 5c276c5View commit details -
Segfaults due to savonet/ocaml-ssl#76
Configuration menu - View commit details
-
Copy full SHA for 5a6cac0 - Browse repository at this point
Copy the full SHA 5a6cac0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 703db62 - Browse repository at this point
Copy the full SHA 703db62View commit details -
Configuration menu - View commit details
-
Copy full SHA for 88d0b24 - Browse repository at this point
Copy the full SHA 88d0b24View commit details -
Use Eio_unix.sleep in examples
Anton says he prefers not passing the clock as an argument.
Configuration menu - View commit details
-
Copy full SHA for 942dbfc - Browse repository at this point
Copy the full SHA 942dbfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 189929e - Browse repository at this point
Copy the full SHA 189929eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 72896f8 - Browse repository at this point
Copy the full SHA 72896f8View commit details
Commits on Apr 8, 2023
-
Remove Lwt from server/ as far as possible
upload.ml uses Lwt_streams, we convert them directly with lwt_eio
Configuration menu - View commit details
-
Copy full SHA for 9a1cada - Browse repository at this point
Copy the full SHA 9a1cadaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c1021d6 - Browse repository at this point
Copy the full SHA c1021d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59af592 - Browse repository at this point
Copy the full SHA 59af592View commit details -
Configuration menu - View commit details
-
Copy full SHA for a46bb20 - Browse repository at this point
Copy the full SHA a46bb20View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1e5e91 - Browse repository at this point
Copy the full SHA c1e5e91View commit details -
Configuration menu - View commit details
-
Copy full SHA for b600bc1 - Browse repository at this point
Copy the full SHA b600bc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02208cd - Browse repository at this point
Copy the full SHA 02208cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for a9cca15 - Browse repository at this point
Copy the full SHA a9cca15View commit details -
Configuration menu - View commit details
-
Copy full SHA for b30594e - Browse repository at this point
Copy the full SHA b30594eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c44b79c - Browse repository at this point
Copy the full SHA c44b79cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 47a4617 - Browse repository at this point
Copy the full SHA 47a4617View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc7ed99 - Browse repository at this point
Copy the full SHA fc7ed99View commit details -
Configuration menu - View commit details
-
Copy full SHA for ceedc70 - Browse repository at this point
Copy the full SHA ceedc70View commit details -
Using capabilities shouldn't be a big problem? Eio.Path.with_open_dir seems to work quite nicely if needed
Configuration menu - View commit details
-
Copy full SHA for f9f68d7 - Browse repository at this point
Copy the full SHA f9f68d7View commit details
Commits on Apr 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 64bef1b - Browse repository at this point
Copy the full SHA 64bef1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d923711 - Browse repository at this point
Copy the full SHA d923711View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bd26a8 - Browse repository at this point
Copy the full SHA 8bd26a8View commit details -
Switch to mirage_crypto_rng_eio
Random.initialize isn't called any more. I think its unnecessary as any crypto calls will fail explicitly (due to performing an effect without a handler). I did not remove it as I'm not that familiar with mirage and didn't want to silently break crypto
Configuration menu - View commit details
-
Copy full SHA for 531bb37 - Browse repository at this point
Copy the full SHA 531bb37View commit details
Commits on Apr 10, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b528ea4 - Browse repository at this point
Copy the full SHA b528ea4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f7f9b9 - Browse repository at this point
Copy the full SHA 1f7f9b9View commit details
Commits on Apr 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 334311e - Browse repository at this point
Copy the full SHA 334311eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b53d91 - Browse repository at this point
Copy the full SHA 0b53d91View commit details
Commits on Apr 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4c3c387 - Browse repository at this point
Copy the full SHA 4c3c387View commit details -
Configuration menu - View commit details
-
Copy full SHA for b98ab65 - Browse repository at this point
Copy the full SHA b98ab65View commit details -
Configuration menu - View commit details
-
Copy full SHA for 306a49a - Browse repository at this point
Copy the full SHA 306a49aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83a6137 - Browse repository at this point
Copy the full SHA 83a6137View commit details
Commits on Apr 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b625e72 - Browse repository at this point
Copy the full SHA b625e72View commit details
Commits on Apr 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0951517 - Browse repository at this point
Copy the full SHA 0951517View commit details -
Remove unnecessary make default target
It was picking up Mirage dependencies. The build target has been updated in master so as to be useful in a Dune workspace and in this PR, without picking up extra dependencies.
Configuration menu - View commit details
-
Copy full SHA for 3bb33d7 - Browse repository at this point
Copy the full SHA 3bb33d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8757a12 - Browse repository at this point
Copy the full SHA 8757a12View commit details -
Configuration menu - View commit details
-
Copy full SHA for df07d35 - Browse repository at this point
Copy the full SHA df07d35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42f54bb - Browse repository at this point
Copy the full SHA 42f54bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for ad54366 - Browse repository at this point
Copy the full SHA ad54366View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9634bc - Browse repository at this point
Copy the full SHA a9634bcView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.