Repository navigation
Auto imports does not work for extensions #19629
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Description
Activity
- assigned and unassigned
on Oct 31, 2017 - addedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
on Oct 31, 2017 Matt Bierner (@mjbvz) can you elaborate on the issue. i am not sure i understand
Repo
- Run
yo codeto create a vs code extension - Select and generate a new js extension
- Open the generated extension in VS Code insiders and then open the
extension.jsfile - At the top of the file, type out
Relativeso thatRelativePatternis shown as a completion item
Expected
Selecting this item should add an import forRelativePatternfrom'vscode'Bug
Selecting this item only does the completion. It does not add the importWith TS 2.6.1 I see this for the error being printed when we request the details:
[Trace - 4:56:58 PM] Sending request: completionEntryDetails (33). Response expected: yes. Current queue length: 0 Arguments: { "file": "/Users/matb/projects/test/test-js-ext/extension.js", "line": 4, "offset": 9, "entryNames": [ { "name": "RelativePattern", "source": "vscode" } ] } [Trace - 4:56:58 PM] Response received: completionEntryDetails (33). Request took 6 ms. Success: false . Message: Error processing request. Debug Failure. False expression. Error: Debug Failure. False expression. at getImportDeclaration (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:75926:30) at /Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:75913:98 at Object.mapDefined (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:1610:30) at getImportDeclarations (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:75912:72) at Object.getCodeActionForImport (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:75882:32) at getCompletionEntryCodeActions (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:65309:31) at Object.getCompletionEntryDetails (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:65283:35) at Object.getCompletionEntryDetails (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:79782:35) at Object.proxy.(anonymous function) [as getCompletionEntryDetails] (/Users/matb/.vscode-oss-dev/extensions/eg2.vscode-ts-tslint-0.0.1/node_modules/tslint-language-service/out/src/index.js:42:33) at /Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:86221:64 at Object.mapDefined (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:1610:30) at IOSession.Session.getCompletionEntryDetails (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:86219:27) at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:85317:61) at /Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:86669:88 at IOSession.Session.executeWithRequestId (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:86660:28) at IOSession.Session.executeCommand (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:86669:33) at IOSession.Session.onMessage (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:86689:35) at Interface.<anonymous> (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:87881: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)- Run
- addedFixedA PR has been merged for this issueA PR has been merged for this issue
on Nov 7, 2017 - locked and limited conversation to collaborators
on Jun 14, 2018
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
From Benjamin Pasero (@bpasero) on October 31, 2017 13:37
Testing: microsoft/vscode#37177
RelativePattern=> no import is added
Imho if there is no import action after accepting a proposal, we should also not show it in the IntelliSense window.
Copied from original issue: microsoft/vscode#37282