Skip to content
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

[api-extractor] Internal Error: Unable to follow symbol for "Set" #4624

Open
andreasbalzer opened this issue Apr 6, 2024 · 1 comment
Open

Comments

@andreasbalzer
Copy link

Summary

microsoft-api-extractor throws 'Unable to follow symbol for "Set"' after I added a JavaScript Set to my code.

I added a Set to an exported type:
export type SiteSetting = {
licenses?: string[];
activeFlights: Set;
};

Repro steps

I'm happy to provide PR details via email.

Expected result:
no error message

Actual result:
unning API Extractor
Analysis will use the bundled TypeScript version 5.0.4
*** The target project appears to use TypeScript 5.3.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
API Extractor failed with the following error:
InternalError: Internal Error: Unable to follow symbol for "Set"

You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.
at AstSymbolTable._analyzeChildTree (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:328:43)
at AstSymbolTable._analyzeChildTree (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeChildTree (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:377:18)
at AstSymbolTable._analyzeAstSymbol (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:247:18)
at /workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:259:34
at AstDeclaration.forEachDeclarationRecursive (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstDeclaration.js:168:9)
at AstDeclaration.forEachDeclarationRecursive (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstDeclaration.js:170:19)
at AstSymbol.forEachDeclarationRecursive (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbol.js:103:28)
at AstSymbolTable._analyzeAstSymbol (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:254:27)
at /workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:259:34
at AstDeclaration.forEachDeclarationRecursive (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstDeclaration.js:168:9)
at AstSymbol.forEachDeclarationRecursive (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbol.js:103:28)
at AstSymbolTable._analyzeAstSymbol (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:254:27)
at AstSymbolTable.analyze (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:113:25)
at /workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:247:62
at Map.forEach ()
at ExportAnalyzer._collectAllExportsRecursive (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:236:48)
at ExportAnalyzer.fetchAstModuleExportInfo (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/ExportAnalyzer.js:179:18)
at AstSymbolTable.fetchAstModuleExportInfo (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/analyzer/AstSymbolTable.js:89:37)
at Collector.analyze (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/collector/Collector.js:164:57)
at Extractor.invoke (/workspaces/1JS/midgard/.store/@[email protected]/node_modules/@microsoft/api-extractor/lib/api/Extractor.js:143:19)
at extractApis (/workspaces/1JS/midgard/packages/midgard-api-extractor/lib/index.js:58:51)
at apiExtractorHandler (/workspaces/1JS/midgard/packages/midgard-scripts/lib/midgard-scripts.js:160:13)
at async buildHandler (/workspaces/1JS/midgard/packages/midgard-scripts/lib/midgard-scripts.js:71:5) {
unformattedMessage: 'Unable to follow symbol for "Set"'
}
API Extraction for @1js/pl-web-components took 1.553s

Details

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? ^7.33.6
Operating system? Linux
API Extractor scenario? rollups (.d.ts) -->
Would you consider contributing a PR? Yes
TypeScript compiler version? 5.3.3
Node.js version (node -v)? v18.15.0
@iclanton
Copy link
Member

iclanton commented Apr 6, 2024

Does the TypeScript compiler build your code without issues? What does your tsconfig.json look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: AE/AD
Development

No branches or pull requests

2 participants