-
Notifications
You must be signed in to change notification settings - Fork 17
Add async-fs wrappers #70
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR, I think this functionality would be a great addition. I kinda regret adding the tokio support to the main crate under a feature flag, because it means if there is ever a tokio 2.0, I'd probably need to bump the major version for all users to support it. I wonder if it might be possible to include async-fs in a new crate (e.g. |
Hmm, so it appears the CI failed because earlier Rust versions don't let you have a dependency named The only other solutions would be to rename the |
If you wanted to go down that path, perhaps the errors could be factored out into a separate crate, and included transitively, creating something like...
Users would depend on It would probably be a fair bit of work, and would obviously involve a breaking version change, but it could make the crate more flexible? |
OK, I've thought about this plan a bit more, and I have a basic outline for how it would work:
There are a few advantages to doing things this way:
...but there are also some disadvantages:
Whether you want to do this or not depends on how you feel about making the error types public and "unsealing" traits like |
Wouldn't this have the same issue of requiring a version bump on the main I'm wondering if unsealing the extension traits might cause breakage too. I'm comfortable relying on documentation to stop external users implementing them, but I think it would be possible for the versions of For now I prefer just exposing |
This pull request adds wrappers for
async-fs
types (used bysmol
), similar to #40. The wrappers are kept behind the optionalasync-fs
feature.