-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add eio backend for tar #132
Conversation
Just noticed #127 perhaps it would be best to wait to see what happens there first. |
Thanks! Indeed, #127 will break this. In #107 I describe the motivation for some of the changes, in particular to I have not used eio so I can't review it at the moment. |
The supplier of the file descriptor will know if it's seekable or not (no if its a network stream, and yes if its a file). We shouldn't have to resort to always using the inefficient implementation in this library. I'm happy for this to go in soon, and be fixed up after #127, if both @reynir and @patricoferris are ok with that... |
Works for me :)) I needed this for the port of OBuilder to Eio (if I have a more up to date port locally) which is basically the only dependency with Lwt. |
My proposal in #107 and #127 is to remove
If the EIO code looks fine I'm happy to merge and release this as tar.2.6.0 for example. |
Looks fine to me (diffing |
Thanks! |
Hi @patricoferris, thanks again for the PR. I am working on cutting a 2.6.0 release with this PR and #133 included. I am observing the following compilation error:
Could you please advice me either how to fix this and what updated version constraints to use or what upper bound I should put on eio. I hope this is easy to answer. Thanks in advance. |
CHANGES: - Add eio backend for tar in `tar-eio` (@patricoferris, review by @talex5, @reynir, mirage/ocaml-tar#132) - Also apply backwards compatibility fix when GNU LongName is used. The compatibility fix is unfortunately also applied for unknown-to-ocaml-tar link indicators (reported by @gravicappa in mirage/ocaml-tar#129, @reynir, mirage/ocaml-tar#133)
Haven't tested it, but this builds for me on Eio 0.12: https://github.com/mirage/ocaml-tar/compare/main...talex5:ocaml-tar:eio-0.12?expand=1 |
There's an issue with this PR, it let the OCaml-CI to only test OCaml 5.x, and no more testing OCaml 4. I don't quite understand why this is the case (and e.g. in the mirage-crypto repository we have similarly a "mirage-crypto-rng-eio" opam package (requiring ocaml 5), but the other opam packages are tested with OCaml 4). Any hints? It would be nice to get the OCaml 4 CI back. |
If the eio package had an explicit dependency on ocaml >= 5 then ocaml-ci wouldn't try to solve for it on older compilers, which should let it find a solution for the other packages. |
CHANGES: - Add eio backend for tar in `tar-eio` (@patricoferris, review by @talex5, @reynir, mirage/ocaml-tar#132) - Also apply backwards compatibility fix when GNU LongName is used. The compatibility fix is unfortunately also applied for unknown-to-ocaml-tar link indicators (reported by @gravicappa in mirage/ocaml-tar#129, @reynir, mirage/ocaml-tar#133)
This is a draft PR to propose an Eio-backend for
Tar
based completely on thelwt-unix
library.For the ease and simplicity this reuses the functors provided by
Tar
along with thetype 'a t = 'a
monad (an approach similar to that in mirage/ocaml-cohttp#984).We probably need some tests, but wanted to see if people were keen or not first :))