rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

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

Open andreasbalzer opened this issue 1 year ago • 1 comments

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

andreasbalzer avatar Apr 06 '24 15:04 andreasbalzer

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

iclanton avatar Apr 06 '24 17:04 iclanton

Possibly related to https://github.com/microsoft/rushstack/issues/3875 ??

firxworx avatar Jul 31 '24 20:07 firxworx