microsoft / lsif-node

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

Error: Document data for document file:///Users/someone/workspace/somefile.ts is already closed #162

Closed williamfzc closed 11 months ago

williamfzc commented 1 year ago

hi team,

Error: Document data for document file:///Users/someone/workspace/somefile.ts is already closed
    at DocumentData.checkClosed (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:232:19)
    at DocumentData.addRange (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:256:14)
    at TSProject.createSymbolData (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:2404:34)
    at DataManager.getOrCreateSymbolData (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:2826:46)
    at ExportSymbolWalker.walkSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1171:41)
    at ExportSymbolWalker.walkSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1178:22)
    at ExportSymbolWalker.walkSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1178:22)
    at ExportSymbolWalker.walk (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1158:14)
    at TSProject.exportSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:2521:31)
    at Visitor.endVisitExportDeclaration (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:3258:28)

(node:19924) UnhandledPromiseRejectionWarning: Error: Document data for document file:///Users/someone/workspace/somefile.ts is already closed
    at DocumentData.checkClosed (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:232:19)
    at DocumentData.addRange (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:256:14)
    at TSProject.createSymbolData (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:2404:34)
    at DataManager.getOrCreateSymbolData (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:2826:46)
    at ExportSymbolWalker.walkSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1171:41)
    at ExportSymbolWalker.walkSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1178:22)
    at ExportSymbolWalker.walkSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1178:22)
    at ExportSymbolWalker.walk (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:1158:14)
    at TSProject.exportSymbol (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:2521:31)
    at Visitor.endVisitExportDeclaration (/Users/someone/.nvm/versions/node/v14.16.0/lib/node_modules/lsif/node_modules/lsif-tsc/lib/lsif.js:3258:28)

It always happen on a specific file. How can I fix/skip this? Thanks in advance

dbaeumer commented 1 year ago

This should actually not happen. Can you provide steps on how to reproduce this?

dbaeumer commented 11 months ago

This issue has been closed because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!