Skip to content

Delete deprecated Info source-context factories - #532

Merged
Firehed merged 2 commits into
mainfrom
519/info-type-drop
Sep 11, 2026
Merged

Firehed merged 2 commits into
mainfrom
519/info-type-drop

Conversation

@Firehed

@Firehed Firehed commented Sep 11, 2026

Copy link
Copy Markdown
Owner

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 Info directly, so the source-context route
these factories represented is closed.

What lands

  • FunctionInfo::fromNode and FunctionInfo::fromReflection delete;
    BuiltinBackend::functionInfo shapes a reflected function directly.
  • ParameterInfo::fromNode and ParameterInfo::fromReflection delete.
  • ConstantInfo::fromGlobalDeclaration deletes along with its private
    docblockFor helper; DeclarationSymbolInfoFactory carries an
    equivalent 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 ?Type fields on the five Info types, rewriting
NativeTypeSource to walk source (SyntaxSource + SourceFileReader),
removing ResolvedSymbol::getType() / ResolvedCallable::getReturnType()
from the interfaces, extending ResolvedSymbolPresenter to compose the
type via TypeSource, migrating the four indirect ->getType()
callsites in ExpressionResolver and MemberAccessDetector, deleting
TypeFactory::fromReflection after its five remaining BuiltinBackend
callers migrate, and trimming allowlists — is tightly coupled and did
not fit alongside these deletions. #519 remains open.

Body drafted by AI; reviewed by human.

Firehed and others added 2 commits September 11, 2026 11:52
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

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (7d052e3) to head (b26c1ed).
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@Firehed
Firehed marked this pull request as ready for review September 11, 2026 19:12
@Firehed
Firehed merged commit f2bbffc into main Sep 11, 2026
9 checks passed
@Firehed
Firehed deleted the 519/info-type-drop branch September 11, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant