-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fetch API, v2 #996
Comments
Unfortunately, I'm still seeing issues with the set of dependencies for the `fetch-lwt` library, when building Onivim 2 - we get this error: I've been trying to avoid reverting this, and maintaining a separate 'oni2' branch w/o it - but it's a lot of extra overhead for me (we can't actually use `fetch` in Onivim 2, either - lack of Windows support & it isn't integrated with libuv). When building from Onivim 2, I get these errors: ``` Bryans-Mac-mini:oni2 bryphe$ esy run -f info building @reason-native-web/[email protected]@d41d8cd9 error: build failed with exit code: 1 build log: # esy-build-package: building: @reason-native-web/[email protected] # esy-build-package: pwd: /Users/bryphe/.esy/source/i/reason_native_web__s__piaf__1.3.0__aac2317a # esy-build-package: running: 'dune' 'build' '--only-packages=piaf' '--profile=release' '-j' '4' '--root=./piaf' Entering directory '/Users/bryphe/.esy/source/i/reason_native_web__s__piaf__1.3.0__aac2317a/piaf' File "lib/http_intf.ml", line 1: Error: The files lib/.piaf.objs/byte/piaf__Scheme.cmi and /Users/bryphe/.esy/3__________________________________________________________________/i/reason_native_web__s__h2_lwt_unix-0.6.1000-eb9002c6/lib/h2-lwt-unix/h2_lwt_unix.cmi make inconsistent assumptions over interface Gluten_lwt_unix__Ssl_io error: command failed: 'dune' 'build' '--only-packages=piaf' '--profile=release' '-j' '4' '--root=./piaf' (exited with 1) esy-build-package: exiting with errors above... building @reason-native-web/[email protected] esy: exiting due to errors above ``` I'd definitely like to have the `fetch` API - some details here: #996 , and really appreciate all the pioneering work you've done @lessp ! If you have any other ideas, @lessp - let me know 👍
What about using the existing libuv ocaml bindings ? https://github.com/aantron/luv |
That's absolutely an alternative, I believe Luv is already used in Oni2. For a viable HTTP(S)-client we'd need to hook it up with something like ocaml-tls. 🙂 |
Definitely - |
@bryphe and I discussed using
Cons
I'm going to investigate how hard it would be to write an |
I made this as a proof of concept: https://github.com/zbaylin/ocurl-luv-test -- the only issues I'm running into as of now is converting a |
Awesome progress @zbaylin ! |
I wonder if we can bring these back in a fork, or just in Revery? |
@lessp has done some awesome work in pioneering a fetch API for us through https://github.com/lessp/fetch
Unfortunately, we can't use it in Onivim 2 yet - I would love to be able to, because we could remove this node-script-shim that we have today: https://github.com/onivim/oni2/blob/63e3159b0f45bed017251e4f35465bcb383a1b50/src/Service/Net/Service_Net.re#L69
There are a couple of blockers:
libuv
as the back-end - I envision Revery / Onivim to use libuv as the event loop. Might be easier once there is alibuv
-lwt engine.The text was updated successfully, but these errors were encountered: