Delete deprecated Info source-context factories - #532
Merged
Merged
Conversation
Inline the sole remaining caller of FunctionInfo::fromReflection in BuiltinBackend::functionInfo, which shapes a reflected function directly now that all other consumers have moved off. FunctionInfo::fromNode had no callers outside its own test cases; both factories delete along with those tests. Constructor smoke coverage stays. Baseline shrinks from 130 to 120. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ParameterInfo::from{Node,Reflection} and
ConstantInfo::fromGlobalDeclaration had no callers outside their own
test cases now that BuiltinBackend and DeclarationSymbolInfoFactory
shape their Info directly. Both factories delete along with the tests
that only covered them; constructor smoke coverage stays.
Baseline shrinks from 120 to 99.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #532 +/- ##
============================================
+ Coverage 99.44% 99.72% +0.27%
+ Complexity 1924 1909 -15
============================================
Files 134 134
Lines 5071 5005 -66
============================================
- Hits 5043 4991 -52
+ Misses 28 14 -14 ☔ View full report in Codecov by Harness. |
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.
Partial progress on Task B of the rescoped #519. Five deprecated
from*factories delete along with the tests that only covered them; their live
call sites already build
Infodirectly, so the source-context routethese factories represented is closed.
What lands
FunctionInfo::fromNodeandFunctionInfo::fromReflectiondelete;BuiltinBackend::functionInfoshapes a reflected function directly.ParameterInfo::fromNodeandParameterInfo::fromReflectiondelete.ConstantInfo::fromGlobalDeclarationdeletes along with its privatedocblockForhelper;DeclarationSymbolInfoFactorycarries anequivalent inline for global constants.
Baseline shrinks from 130 to 99.
Not yet in this PR
Task B's field-and-interface collapse is not landed here. The remaining
work — dropping eager
?Typefields on the five Info types, rewritingNativeTypeSourceto walk source (SyntaxSource+SourceFileReader),removing
ResolvedSymbol::getType()/ResolvedCallable::getReturnType()from the interfaces, extending
ResolvedSymbolPresenterto compose thetype via
TypeSource, migrating the four indirect->getType()callsites in
ExpressionResolverandMemberAccessDetector, deletingTypeFactory::fromReflectionafter its five remainingBuiltinBackendcallers migrate, and trimming allowlists — is tightly coupled and did
not fit alongside these deletions. #519 remains open.
Body drafted by AI; reviewed by human.