Repository navigation
Remember what a document declares, per file - #649
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #649 +/- ##
============================================
- Coverage 99.65% 99.65% -0.01%
+ Complexity 1916 1903 -13
============================================
Files 135 136 +1
Lines 4946 4882 -64
============================================
- Hits 4929 4865 -64
Misses 17 17 ☔ View full report in Codecov by Harness. |
Firehed
added this pull request to stack #653
September 29, 2026 17:17
Firehed
commented
Sep 29, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Firehed
force-pushed
the
pipeline/2-declaration-source
branch
from
September 29, 2026 20:01
e3141a4 to
17124c1
Compare
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Callers filter allIn() directly. Removes the derived verb the one-route rule warned against: with the wrapper gone there is no second walk that could fork from the one it derived from. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Second of five stacked PRs, on top of the document source. #646 is the total view.
What was wrong
What this does
DeclarationSourceInterfaceis the one way to get what a document declares. The three backends hold it in place of a parser, a scanner, and an info factory.CachingDeclarationSourceremembers declarations by the file's path and text together. Changed text is a different key, so nothing is invalidated. It holds 2,000 documents and drops the least recently used.CachingSymbolSourceis deleted.TextDocumentindexes line starts on first use. A document read only for what it declares is never asked for a position, and the index was most of the cost of a cached lookup.Behaviour changes
Measured
openemr, class-name completion while typing, median of seven sessions, change message plus request.
mainnew Panew Patnew Patinew PatagainTests removed or rewritten
Each at Eric's direction.
CachingSymbolSourceTestis deleted with its subject.CompositeInvalidatableTestdrove the composite through the deleted class. It now changes the disk under each of the three members and asks that member.ServerTest::testParsesAreScopedToOneMessageasserted that identical text re-sent must parse again. It is nowtestTheSyncPathParsesATextOnce.DeclarationSymbolInfoFactory::fromDeclarations()has no caller left insrc/. Two test files still use it.Enforcement edits
phpstan.neonlookupConstant()allowlist: dropCachingSymbolSource🤖 Generated with Claude Code