Rename the four Reader types so only one reads bytes - #906
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Renames the three point-lookup handles that shared the
Readername with the one type that reads bytes, soReadermeans one thing.Changes
nectar-mantaray:Reader<L>becomesTrieLookup<L>in theTrie*family,ReaderErrorbecomesLookupError, and the publicreadermodule moves tolookup.nectar-ldb:Reader<S, F, R>becomesKeyLookup<S, F, R>,ReaderErrorbecomesLookupError, the privatereadermodule and thereaderintegration-test file move tolookup, andView's privatereader()helper becomeslookup().nectar-feeds:Reader<S, BODY_SIZE>becomesFeedView<S, BODY_SIZE>, the privatereadermodule moves toview, and theFeedgeometry comment now names the view and the publisher.nectar-filebyte reader keeps the name; its re-exports and every consumer of it are untouched.as MantarayReaderandas LdbReaderaliases, which existed to disambiguate two types that were both calledReaderand now name themselves.readerkeep their role name, the way the existingcursorlocals do againstScanCursorandTrieCursor.Breaking changes
Pre-1.0 API, so these land as-is: three public types are renamed (mantaray
Reader, ldbReader, feedsReader), two error types are renamed (the ldb and mantarayReaderError), the public pathnectar_mantaray::readerbecomesnectar_mantaray::lookup, and theLdbFormatErrorandTrieFormatErrorReadvariants now wrapLookupError.Testing
cargo nextest run --workspace(1429/1429) plus every per-feature nextest lane, every doctest lane, and the wasm32 checks fromunit.yml, on a warm target.cargo clippyclean on the full 17-lane feature matrix fromlint.yml, withmachete, the fmt checks, the no-em-dash, serde-dev-only, reinvention and arbitrary-proptest-dev gates, and rustdoc under itsdocs.rsfeature set for the three touched packages.Related issues
This PR is the
Readerhalf of the rename; the issue'sCursorhalf already landed with the cursor work.AI assistance disclosure
AI Assistance: opencode used for the collision check, the mechanical rename and this PR body; the names were settled in discussion with the maintainer.
Notes for reviewers
PathCursorandRawCursor, mantaray's manifest module already ownsTrieCursor, and none of the three handles walks sequentially, so a cursor name would re-create the confusion the issue removes.TrieLookupfollows the backend-qualifier convention the cursor work settled for mantaray (TrieListing,TrieCursor,TrieView), and the crate's own docs call the handle a depth-guarded point lookup.KeyLookupis the issue's own description of the ldb handle, and it sits beside theViewthat speaks the map vocabulary over it;FeedViewis the issue's description of the feeds handle, the read mirror ofPublisher.Checklist
Closes