-
Notifications
You must be signed in to change notification settings - Fork 157
Major refactor to eliminate reply callbacks, revised #347
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: master
Are you sure you want to change the base?
Conversation
Filesystem methods callback argument `reply` has been removed. reply::ReplyX traits have been combined into a single ReplyHandler type. request::dispatch passes the filesystem's response to an appropriate ReplyHandler method.
…o an owned `RequestMeta`. Replies to Init and Destroy operations are now handled by ReplyHandler rather than ll::request. Defined struct Forget to unify signatures of forget and batch_forget.
…ructs: Entry, Open, Statfs, Lock, XTimes. Reorganized existing structs: FileType, FileAttr. Some borrowed arguments have been converted to owned arguments.
Elide unneeded lifetimes. Remove _ from Filesystem parameters (warning has been silenced). Prefer borrowed types for Filesystem parameters. Fixed init bug in ll::request::tests. Useful derives for library-public types. Refactored redundant access logic. Removed publicity from some previously public structs.
unsized data under a wide variety of ownership models. Filesystem methods that previously replied with &[u8] or similar now return Bytes, which is short for Container<u8>.
Dirent(Plus)List is an alias for a Container<Dirent>, which enables Filesystem methods to handle and return data under a variety of ownership models. `offset` and `max_bytes` parameters are now enforced by the library, so they can be considered as optional. The library should do its best to avoid repeatedly copying Directory data before constructing the response buffer.
Reverted PollHandle back to u64. Added documentation throughout examples. Updated documentation for mount functions.
Created `no_reply()` method to prevent an error on `drop()`.
…a synchronous session loop. Updated notify and poll examples. Corrected a bugs related to polls flags. Refactored poll example by moving poll handle logic into a seperate module.
…he Notification API. Backing id handling has been relocated to the example passthrough filesystem implementation. Backing id is now an (optional) field of the `Open` struct that returns from `open()`, etc. Related kernel communication has been relocated to the (new) `ll::ioctl` module. Updated the passthrough integration test to be compatible with MacOS.
…tes in Notification structs.
…roundSession functions are gated by `"threaded"` to support single-threaded compilation for non-Send Filesystems. Container `Rc` variants are gated by `"no-rc"` so that Container is Send when it needs to be.
|
Since @cberner said he doesn't have a lot of time to look at pull requests, I asked Gemini 2.5 Pro to review it. Here is the prompt I (foolishly) went with:
Have you ever seen an AI rip someone to shreds? I've now got about 14,000 words of harsh negative feedback to brutalize myself with whenever I feel the need to cry myself to sleep. It literally called my TLDR, I should probably just withdraw this PR before I embarrass myself even further. |
|
That notebook isn't accessible, but ya AIs are known to be harsh when you ask them to be. In its current state, I don't think we'll be able to merge this PR. If you decide to continue pursuing this, I think the approach to take is the one I outlined in this comment: add a new trait, such as That way we can experiment with the new API, and people in the community can try it out and give feedback, before refactoring the whole codebase and removing the old interface |
Summary:
Changelog.mdfor more details.Goals:
asyncfeatures.cargo clippy).Status:
ioctl) are known to function correctly.Next: