Skip to content

Rename the four Reader types so only one reads bytes - #906

Merged
mfw78 merged 1 commit into
mainfrom
refactor/837-reader-renames
Aug 27, 2026
Merged

Rename the four Reader types so only one reads bytes#906
mfw78 merged 1 commit into
mainfrom
refactor/837-reader-renames

Conversation

@mfw78

@mfw78 mfw78 commented Aug 27, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Renames the three point-lookup handles that shared the Reader name with the one type that reads bytes, so Reader means one thing.

Changes

  • nectar-mantaray: Reader<L> becomes TrieLookup<L> in the Trie* family, ReaderError becomes LookupError, and the public reader module moves to lookup.
  • nectar-ldb: Reader<S, F, R> becomes KeyLookup<S, F, R>, ReaderError becomes LookupError, the private reader module and the reader integration-test file move to lookup, and View's private reader() helper becomes lookup().
  • nectar-feeds: Reader<S, BODY_SIZE> becomes FeedView<S, BODY_SIZE>, the private reader module moves to view, and the Feed geometry comment now names the view and the publisher.
  • The nectar-file byte reader keeps the name; its re-exports and every consumer of it are untouched.
  • The manifest-test imports drop their as MantarayReader and as LdbReader aliases, which existed to disambiguate two types that were both called Reader and now name themselves.
  • Module and type docs state lookup where they said reader; local bindings named reader keep their role name, the way the existing cursor locals do against ScanCursor and TrieCursor.

Breaking changes

Pre-1.0 API, so these land as-is: three public types are renamed (mantaray Reader, ldb Reader, feeds Reader), two error types are renamed (the ldb and mantaray ReaderError), the public path nectar_mantaray::reader becomes nectar_mantaray::lookup, and the LdbFormatError and TrieFormatError Read variants now wrap LookupError.

Testing

  • Unit tests pass: cargo nextest run --workspace (1429/1429) plus every per-feature nextest lane, every doctest lane, and the wasm32 checks from unit.yml, on a warm target.
  • cargo clippy clean on the full 17-lane feature matrix from lint.yml, with machete, the fmt checks, the no-em-dash, serde-dev-only, reinvention and arbitrary-proptest-dev gates, and rustdoc under its docs.rs feature set for the three touched packages.
  • Manual testing completed: none; the change is a mechanical rename witnessed by the suites above.
  • Documentation updated: the module docs of all three crates state the settled names.

Related issues

This PR is the Reader half of the rename; the issue's Cursor half 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

  • The names were checked against the tree before use, as the issue warns: the cursor-flavoured alternatives are dead, because the shared read machinery already landed PathCursor and RawCursor, mantaray's manifest module already owns TrieCursor, and none of the three handles walks sequentially, so a cursor name would re-create the confusion the issue removes.
  • TrieLookup follows 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.
  • KeyLookup is the issue's own description of the ldb handle, and it sits beside the View that speaks the map vocabulary over it; FeedView is the issue's description of the feeds handle, the read mirror of Publisher.

Checklist

  • Code follows project style
  • Self-review completed
  • Tests added/updated
  • No console.logs or debug code left behind
  • PR title is descriptive

Closes

@mfw78
mfw78 merged commit e0ec8bb into main Aug 27, 2026
42 checks passed
@mfw78
mfw78 deleted the refactor/837-reader-renames branch August 27, 2026 06:14
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workspace: rename the four Reader types so only one reads bytes

1 participant