Remove redundant @text_files_hash - #1814
Merged
Merged
Conversation
Documentation previewCommit: |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The removed cache has no remaining references, and the new find_text_page logic preserves expected behavior while simplifying state management.
Pull request overview
This PR simplifies RDoc::Store by removing the dedicated @text_files_hash cache and instead using @files_hash plus TopLevel#text? to identify text pages on demand.
Changes:
- Removed
@text_files_hashtracking and the associatedcache_text_filemethod fromRDoc::Store. - Simplified
Store#find_text_pageto fetch from@files_hashand return the page only when it is a text page (text?). - Removed
TopLevel#parser=’s side-effect (updating the removed cache) and switchedparsertoattr_accessor.
File summaries
| File | Description |
|---|---|
| lib/rdoc/store.rb | Removes the redundant text-page cache and makes find_text_page rely on @files_hash + text?. |
| lib/rdoc/code_object/top_level.rb | Removes cache-updating behavior from parser= now that text-page caching is gone. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
st0012
approved these changes
Sep 6, 2026
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: Stan Lo <stan001212@gmail.com>
tompng
force-pushed
the
rm_text_files_hash
branch
from
September 7, 2026 12:42
7052e6c to
55f31f8
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
@files_hash+page.text?is enough.