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

Move file: getEditsForRefactor debug failure in mapTextChangesToCodeEditsUsingScriptinfo #24757

Closed
mjbvz opened this issue Jun 7, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 7, 2018

From microsoft/vscode#51366

TypeScript Version: 3.0.0-dev.20180607

Search Terms:

  • move file refactoring
  • getEditsForRefactor

Code

  1. Clone https://github.com/ivanvoznyakovsky/ts-refactoring-issue
  2. Open service1.ts
  3. Try running move to new file on Service2 in the file

Bug

[Trace  - 10:27:08 AM] Response received: getEditsForRefactor (103). Request took 33 ms. Success: false . Message: Error processing request. Debug Failure. False expression.
Error: Debug Failure. False expression.
    at IOSession.Session.mapTextChangesToCodeEditsUsingScriptinfo (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:97967:26)
    at /Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:97963:73
    at Array.map (native)
    at IOSession.Session.mapTextChangesToCodeEdits (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:97963:36)
    at IOSession.Session.getEditsForRefactor (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:97880:112)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:96757:61)
    at /Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:98084:88
    at IOSession.Session.executeWithRequestId (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:98075:28)
    at IOSession.Session.executeCommand (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:98084:33)
    at IOSession.Session.onMessage (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:98104:35)
    at Interface.<anonymous> (/Users/matb/projects/scratch/ts-refactoring-issue/node_modules/typescript/lib/tsserver.js:99310:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:191:7)
    at Interface._onLine (readline.js:241:10)
    at Interface._normalWrite (readline.js:384:12)
    at Socket.ondata (readline.js:101:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at Pipe.onread (net.js:560:20)

Playground Link:

Related Issues:

@mhegazy
Copy link
Contributor

mhegazy commented Jun 7, 2018

looks like a duplicate of #24613.

@mhegazy mhegazy added the Duplicate An existing issue was already created label Jun 7, 2018
@mjbvz
Copy link
Contributor Author

mjbvz commented Jun 7, 2018

Yep, thanks

@mjbvz mjbvz closed this as completed Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants