Skip to content

JS: Deprecate type extraction #19640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft

Conversation

asgerf
Copy link
Contributor

@asgerf asgerf commented Jun 2, 2025

Disables type extraction by setting the default TypeScript extraction mode back to basic, meaning only parsing is performed by the extractor.

Deprecates Type and other APIs relating to extracted types, and introduces a simple interface for interacting with the new QL-based name/type resolution.

When I made the original call graph estimated I had unfortunately not disabled the influence of type extraction completely, meaning lose more call edges than originally estimated. This PR recovers adds a few more fixes to recover some of them, but as seen in the evaluation we still lose 1 alert, and 25k call edges. I have some follow-up work with generics that recovers about a third of the call edges. Despite the lost call edges, I'd like to move ahead with this PR now so we can unblock other works that depend on it, and make sure extraction succeeds for repositories where type extraction is currently causing issues.

@github-actions github-actions bot added the JS label Jun 2, 2025
name = spec.getExportedName() and
result = spec.getLocal()
)
or

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.
name = sig.getName()
)
private class MethodCallSig extends Function {
private MethodSignature signature;

Check notice

Code scanning / CodeQL

Field only used in CharPred Note

Field is only used in CharPred.
@asgerf asgerf force-pushed the js/no-type-extraction branch from 7ba856a to 2cd92ef Compare June 4, 2025 10:51
Comment on lines +10 to +12
/**
* Interface for accessing name-resolution info about type names.
*/

Check warning

Code scanning / CodeQL

Class QLDoc style. Warning

The QLDoc for a class should start with 'A', 'An', or 'The'.
Comment on lines +142 to +144
/**
* Interface for accessing name-resolution info about expressions.
*/

Check warning

Code scanning / CodeQL

Class QLDoc style. Warning

The QLDoc for a class should start with 'A', 'An', or 'The'.
@asgerf asgerf force-pushed the js/no-type-extraction branch 5 times, most recently from 9521fbb to 2035925 Compare June 11, 2025 08:48
@asgerf asgerf force-pushed the js/no-type-extraction branch from df2834e to 3a1fae6 Compare June 24, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant