-
Notifications
You must be signed in to change notification settings - Fork 657
[api-extractor] Improve how external packages are analyzed #1077
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
Merged
Conversation
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
… the issue where external packages are incorrectly collected
…ss citizen like AstSymbol (whereas in the past it was tracked via an AstSymbol.astImport property) - Introduced AstEntity as an abstraction of AstImport and AstSymbol - Replaced AstSymbol.imported with AstSymbol.isExternal, which now accurately tracks whether a symbol is external to the working package - The analyzer now generally stops traversing symbol aliases when it reaches an AstImport, which should eliminate an entire category of bugs resulting from overanalysis of external packages --> this should also improve perf
Collaborator
Author
|
@natalieethell FYI this is the PR I've been working on to address issue #1054 |
This was referenced Feb 5, 2019
…equivalence relation (which is based on names, not symbols)
…nce this PR eliminates the logic that consulted the AstModule --> This avoids a number of bugs where legacy *.d.ts files contained difficult to handle constructs
…y being included in public/api-extractor-test-04.d.ts
- Simplified the nominalAnalysis concept
Collaborator
Author
|
@natalieethell @iclanton this PR is finally ready for review. Now's a good time to try running it on any repro branches that were encountering errors. |
iclanton
approved these changes
Feb 11, 2019
Member
iclanton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
iclanton
approved these changes
Feb 11, 2019
…-reexport-bugs # Conflicts: # build-tests/api-extractor-test-04/package.json
Collaborator
Author
|
Published as API Extractor 7.0.16 beta. |
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.
This PR should fix a number of
InternalErrorbugs that people have been reporting when AE7 processes external imports.Changes:
Redesign the analyzer so that when an external symbol is reexported by the working package, the local object (
AstImport) and external object (AstSymbol) are kept separateFix a number of bugs where external symbols were misinterpreted as being part of the local project
Eliminate a number of errors involving unusual language constructs, by avoiding analysis of external symbols unless it's really necessary
Simplify the
AstSymbol.nominalAnalysisconcept and associated codeImprove .d.ts rollup trimming to handle reexported symbols correctly