microsoft / lsif-node

Define an index format for Language Servers
MIT License
172 stars 37 forks source link

Early exit from LSIF tooling #139

Open noellelc opened 2 years ago

noellelc commented 2 years ago

When I run the LSIF tooling against the vscode repo, I get this error and the job terminates earlier than expected:

Error: Can't upgrade symbol data visibility for W9Wyh/ULV38V/wW5YBD9bg== from 1 to 4
    at StandardSymbolData.changeVisibility (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:432:23)
    at IndirectExportWalker.changeVisibility (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:1079:24)
    at IndirectExportWalker.visitSymbol (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:1109:14)
    at IndirectExportWalker.walkSymbol (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:1044:30)
    at IndirectExportWalker.walkSymbol (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:1062:26)
    at IndirectExportWalker.walkType (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:1034:18)
    at IndirectExportWalker.walkType (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:1011:26)
    at IndirectExportWalker.walkType (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:980:26)
    at IndirectExportWalker.walk (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:949:18)
    at TSProject.computeIndirectExports (C:\repos\VSCloudKernel\src\RichCodeNav.LSIF\node_modules\lsif-tsc\lib\lsif.js:2503:23)

I am guessing it has something to do with a change in the repo itself, because if I go back several commits, for example to 9A4005FDA8A656F3863DA92902BBB48DAD73A769, the tool runs successfully across the entire repo.

dbaeumer commented 2 years ago

The problematic code peace is here: https://github.com/microsoft/vscode/blob/1498d0f34053f854e75e1364adaca6f99e43de08/src/vs/editor/contrib/find/browser/findState.ts#L38

{ update: () => {} }

Update is treated as internal which is actually correct, but somehow I want to make it public visible.

dbaeumer commented 2 years ago

@noellelc I published lsif@0.6.0-next.22 which avoid the early exit. But the dump will not have a moniker for the symbol. I need to address this separately