-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
VSCode cannot jump to the result file row if got results too fast from vscode-msr + VsCode cannot de-duplicate results correctly #96754
Comments
Are you sure that you are the only definition provider? Check by disabling all other extensions or do "F1 > Log Level > Trace" and the check the extension host log for all providers that are being invoked |
@jrieken: Thanks so much for your reply! As mentioned above: The issue doesn't occur |
This seems to be: vscode doesn't coordinate well for multiple definition providers. What's more, vscode should de-duplicate results: I often found duplicate results were found and vscode prompts a choosing-result-window. But in fact, the results (often 2 results since 2 definition providers) are the same: same file path + same row. |
@jrieken Just normally wake up now:) Explicitly answer: 1. The issue of finding definition and vscode failed to jump to the location :
2. Not the only definition provider, vscode-msr usually works with one or more official or professional definition provider. For example:
3. the
|
Yes, VS Code waits for all providers to return their results then shows a merged view. That's done because all providers are equal and because any timeout-value would be totally arbitrary and very likely not transport well to other machines (as hardware specs differ). Waiting for all results is done because we don't want to update the results as they come in, e.g. we need to know if there is just one result or multiple because the UX behaves different. We also want to provide a stable UI that doesn't change after it shows. I assume that your extension uses some text-search/index based approach that puts speed over correctness. That's fair but you will always compete with "semantic" language services. My only recommendation is to approach those extensions and ask them to add a setting that allows users to enable/disable their definition etc providers. Consequently, your extension should do the same |
@jrieken Thanks for your profound answer! I understood the waiting logic for all results from all definition providers (extensions) and also the tough work. In brief:1. My extension (vscode-msr) already provided several switches to disable/enable finding definitions or references: Every function is under users' control.2. How to solve the issue of unable to jump to the definition when 1 extension got results.
3.Summary: I'd like to suggest that vscode should solve the final result processing work:
|
We do that. Check out this:
You will need to file issues against those extensions |
Thanks so much for such a quick reply! But take care of your body (guess late night or too early~~) |
Add extension host tracing level log of duplicate defintion results: |
After I disabled the official extension ms-python.python, only keep vscode-msr for So the conclusion is clear that:
It's easy to verify them: |
- Support adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Add highest score for current file to keep 1 result when finding definition. - Add skip pattern for PowerShell when use `Regex find definition in current file`. - Add `open-doskeys` command shortcut on Windows. - Support finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command platte for `project files` or `all files includes extra search paths`. - Add long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
- Support adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Add highest score for current file to keep 1 result when finding definition. - Add skip pattern for PowerShell when use `Regex find definition in current file`. - Add `open-doskeys` command shortcut on Windows. - Support finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command platte for `project files` or `all files includes extra search paths`. - Add long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
- Support adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Add highest score for current file to keep 1 result when finding definition. - Add skip pattern for PowerShell when use `Regex find definition in current file`. - Add `open-doskeys` command shortcut on Windows. - Support finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command platte for `project files` or `all files includes extra search paths`. - Add long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
- Support adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Add highest score for current file to keep 1 result when finding definition. - Add skip pattern for PowerShell when use `Regex find definition in current file`. - Add `open-doskeys` command shortcut on Windows. - Support finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command platte for `project files` or `all files includes extra search paths`. - Add long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
- Support adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Add highest score for current file to keep 1 result when finding definition. - Add skip pattern for PowerShell when use `Regex find definition in current file`. - Add `open-doskeys` command shortcut on Windows. - Support finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command platte for `project files` or `all files includes extra search paths`. - Add long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
- Support adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Add highest score for current file to keep 1 result when finding definition. - Add skip pattern for PowerShell when use `Regex find definition in current file`. - Add `open-doskeys` command shortcut on Windows. - Support finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command platte for `project files` or `all files includes extra search paths`. - Add long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
- Supported adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Added highest score for current file to keep 1 result when finding definition. - Added skip pattern for PowerShell when use `Regex find definition in current file`. - Added `open-doskeys` command shortcut on Windows. - Supported finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command palette for `project files: code + config + doc` or `all files`. - Added long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
- Supported adding new languages with it's mapped-extension + extension list. - Search current file at first to fast get results of definition. - Added highest score for current file to keep 1 result when finding definition. - Added skip pattern for PowerShell when use `Regex find definition in current file`. - Added `open-doskeys` command shortcut on Windows. - Supported finding definition in `batch` files (`*.bat` + `*.cmd`). - Increased max line character count from 260 to 360 when call `Regex finding pure reference`. - Enabled `Sorting by time/size` command palette for `project files: code + config + doc` or `all files`. - Added long existing [VsCode Bug](microsoft/vscode#96754): Unable to jump to definitions sometimes + Duplicate definition + reference results.
The problem still exists. |
All info with screenshots on the top box (needless to scroll down), easy to reproduce. |
The results are different - despite selecting the same line they aren't on the exact same ranges. |
@jrieken: I guess your reply is only for duplicate results bug, how about the |
1 issue, 1 topic please |
Issue summary
vscode
cannot correctly de-duplicate results ofGo To Definition
from 2 definition providers.vscode
cannot correctly de-duplicate results ofFind All References
from 2 providers.vscode
cannot correctly jump to the definition location + progress bar keeps moving, if has 2+ definition providers, when vscode-msr found the definition while other official/professional extensions not found it:Python
.Powershell
.Steps to Reproduce:
F12
or menuGo To Definition
) for a function or method in a code/script file likeC#
/Python
/C++
/Java
/Powershell
etc.See my test screenshot below with just cloned vscode-python source code to test:
pythonFiles/install_debugpy.py
_download_and_extract
+DEBUGGER_DEST
Additionally:
msr.quiet
inUser settings
to auto show searching info each time inMSR-Def-Ref
channel inOUTPUT
tab.Alt+F2
(or pressF1
->msr toggle enable finding
) to temporarily enable or disablevscode-msr
finding definition.Does this issue occur when all extensions are disabled?: No -> after I disabled only the corresponding language extension (like
vscode-python
in my test case)1. Cannot jump to the location of only one result, progress bar keeps moving:
2.Cannot de-duplicate correctly for results of
Go To Definition
:3. Also got duplicate results of
Find Alll References
:This time the bug location is much obvious to start tracing at here: CommandsConverter#CREATE

The text was updated successfully, but these errors were encountered: