Add async-fs wrappers#70
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 |
@andrewhickman You don't have to break compat as your crate can depend on two semver-incompatible versions of the same package. It shouldn't be mutually exclusive features. See an example in |
This pull request adds wrappers for
async-fstypes (used bysmol), similar to #40. The wrappers are kept behind the optionalasync-fsfeature.