-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Milestone
Description
Bug Report
🔎 Search Terms
- completionEntryDetails
- completion
- suggest / suggestions
- source
🕗 Version & Regression Information
Seen on 4.2.0-20210210 and 4.1.5
💻 Repo
- In the VS Code codebase, open this file
- Delete the existing import for
Disposable
- Now for
export class ExtensionsLifecycle extends Disposable
, trigger suggestions at the end ofDisposable
- Accept the suggestion for
Disposable
fromweb.api
:
🙁 Actual behavior
I expected this to add an import from web.api
🙂 Expected behavior
It actually ends up adding the import from import { Disposable } from 'vs/base/common/lifecycle';
I believe this is because the Disposable
from web.api
is a re-export of the one from lifecycle
You can also get into the reverse state, where the suggestion for lifecycle
ends up adding an import from web.api
. Here are the completionEntryDetails
from that case:
[Trace - 01:51:33.997] <semantic> Sending request: completionEntryDetails (110). Response expected: yes. Current queue length: 0
Arguments: {
"file": "/Users/matb/projects/vscode/src/vs/platform/extensionManagement/node/extensionLifecycle.ts",
"line": 16,
"offset": 52,
"entryNames": [
{
"name": "Disposable",
"source": "/Users/matb/projects/vscode/src/vs/base/common/lifecycle"
}
]
}
[Trace - 01:51:34.82] <semantic> Response received: completionEntryDetails (110). Request took 85 ms. Success: true
Result: [
{

"name": "Disposable",
"kindModifiers": "abstract,export",
"kind": "class",
"displayParts": [
{
"text": "class",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "Disposable",
"kind": "className"
}
],
"documentation": [],
"codeActions": [
{
"description": "Import 'Disposable' from module \"vs/workbench/workbench.web.api\"",
"changes": [
{
"fileName": "/Users/matb/projects/vscode/src/vs/platform/extensionManagement/node/extensionLifecycle.ts",
"textChanges": [
{
"start": {
"line": 15,
"offset": 1
},
"end": {
"line": 15,
"offset": 1
},
"newText": "import { Disposable } from 'vs/workbench/workbench.web.api';\n"
}
]
}
]
}
],
"source": [
{
"text": "vs/workbench/workbench.web.api",
"kind": "text"
}
]
}
]
bpasero