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

Debug failure on paste with imports #58740

Open
mjbvz opened this issue Jun 3, 2024 · 0 comments Β· May be fixed by #59004
Open

Debug failure on paste with imports #58740

mjbvz opened this issue Jun 3, 2024 · 0 comments Β· May be fixed by #59004
Assignees
Labels
Bug A bug in TypeScript Domain: Auto-import Fix Available A PR has been opened for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 3, 2024

πŸ”Ž Search Terms

  • paste with imports

πŸ•— Version & Regression Information

5.5.0-dev.20240602

⏯ Playground Link

No response

πŸ’» Code

Don't have a minimal repo yet but hitting this pretty consistently:

  1. In https://github.com/microsoft/vscode-markdown-languageservice with VS Code
  2. "typescript.experimental.updateImportsOnPaste": true with latest nightly TS
  3. Copy the constructor here https://github.com/microsoft/vscode-markdown-languageservice/blob/7156aba6bdffef89b9210def0e0dda785569d1ab/src/languageFeatures/folding.ts#L26C1-L34C3
  4. Paste it into a new file

πŸ™ Actual behavior

copyPasteController.ts:510 Error: <semantic> TypeScript Server Error (5.5.0-dev.20240602)
Debug Failure.
Error: Debug Failure.
    at Object.addImportFromExportedSymbol (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:154212:32)
    at /Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:144257:19
    at Map.forEach (<anonymous>)
    at addTargetFileImports (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:144251:17)
    at /Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:178190:7
    at ConfiguredProject2.runWithTemporaryFileUpdate (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:183844:5)
    at pasteEdits (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:178172:55)
    at /Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:178158:118
    at _ChangeTracker.with (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:174292:5)
    at Object.pasteEditsProvider (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:178158:60)
    at Object.getPasteEdits (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:149221:34)
    at IpcIOSession.getPasteEdits (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:191112:49)
    at getPasteEdits (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:189302:43)
    at /Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:191478:69
    at IpcIOSession.executeWithRequestId (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:191470:14)
    at IpcIOSession.executeCommand (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:191478:29)
    at IpcIOSession.onMessage (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/typescript.js:191520:51)
    at process.<anonymous> (/Users/matb/projects/vscode-markdown-languageservice/node_modules/typescript/lib/tsserver.js:523:14)
    at process.emit (node:events:514:28)
    at emit (node:internal/child_process:951:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
    at Function.create (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:473136)
    at v.dispatchResponse (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:467106)
    at v.dispatchMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:465950)
    at ChildProcess.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/typescript-language-features/dist/extension.js:1:465443)
    at ChildProcess.emit (node:events:514:28)
    at emit (node:internal/child_process:951:14)

tsserver.log

πŸ™‚ Expected behavior

No crash

Additional information about the issue

No response

@DanielRosenwasser DanielRosenwasser added this to the TypeScript 5.5.2 milestone Jun 3, 2024
@navya9singh navya9singh linked a pull request Jun 24, 2024 that will close this issue
@typescript-bot typescript-bot added Fix Available A PR has been opened for this issue labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Auto-import Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants