Repository navigation
"Some references may be missing" warning constantly spammed in Output console not respecting the loggingLevel setting! #13066
Description
Environment
- OS and Version: Windows 11 Home 23H2 - 22631.4602
- VS Code Version: 1.96.0
- C/C++ Extension Version: 1.22.11
- If using SSH remote, specify OS of remote machine: -
Bug Summary and Steps to Reproduce
Bug Summary:
The warning
[Warning] Some references may be missing, because workspace parsing was incomplete when Find All References was started.2
keeps beim spammed to my output tab in the terminal. I have already tried everything i could find, adapted my c_cpp_properties.json, increased memory for intellisense and so on. It kept being spammed. Okay, I found this issue #6320 and they say the warning is "by design" - sure, no problem, makes sense to me. So then I will just change the loggingLevel through my settings, so I went and set
"C_Cpp.loggingLevel": "Error"
in both .vscode/settings.json as well as the global settings.json.
Warnings still came through, opening my console every minute or so completely shredding my train of thought every single time. Fine, then I'll go
"C_Cpp.loggingLevel": "None"
AND THE WARNING STILL COME THROUGH AND POP UP!
Please ... i just want to code undisturbed by this goddamn output terminal!
Steps to reproduce:
- Try to disable the warnings in output by setting "C_Cpp.loggingLevel": "Error" | "None"
- they still pop up
Expected behavior:
- Try to disable the warnings in output by setting "C_Cpp.loggingLevel": "Error" | "None"
- they dont pop up
Configuration and Logs
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/src/**",
"${workspaceFolder}/../Deps/include/**"
],
"defines": [],
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}
-------- Diagnostics - 12/17/2024, 3:27:02 PM
Version: 1.22.11
Current Configuration:
{
"name": "Win32",
"includePath": [
"h:/Projects/AbandonedCrypt/FirstSoloSteps/src/**",
"h:/Projects/AbandonedCrypt/FirstSoloSteps/../Deps/include/**"
],
"defines": [],
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"compilerPathInCppPropertiesJson": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe",
"mergeConfigurations": false,
"browse": {
"path": [
"h:/Projects/AbandonedCrypt/FirstSoloSteps/src/**",
"h:/Projects/AbandonedCrypt/FirstSoloSteps/../Deps/include/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
Modified Settings:
{
"C_Cpp.maxMemory": 8000,
"C_Cpp.intelliSense.maxMemory": 8000,
"C_Cpp.loggingLevel": "None"
}
Additional Tracked Settings:
{
"editorTabSize": 2,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"*.erd": "json",
"*.vuerd": "json",
"*.php": "php",
"*.uss": "css",
"*.rh": "cpp",
"algorithm": "cpp",
"atomic": "cpp",
"fstream": "cpp",
"functional": "cpp",
"limits": "cpp",
"system_error": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"xmemory": "cpp",
"xstring": "cpp",
"xutility": "cpp",
"vector": "cpp",
"bit": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"list": "cpp",
"locale": "cpp",
"memory": "cpp",
"new": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"tuple": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xstddef": "cpp",
"xtr1common": "cpp"
},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.22.11.0
Current database path: C:\USERS\DANIEL\APPDATA\LOCAL\MICROSOFT\VSCODE-CPPTOOLS\4AE546161FD56BA38EE6E15FB0FBFFA2\.BROWSE.VC.DB
No active translation units.
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 5430Other Extensions
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
bobbrow commentedon Dec 17, 2024
Daniel Rauhut (@0tii) thanks for reporting this. It appears that this specific piece of logging does not take the loggingLevel setting into account. We should fix this.
I don't remember our decision here (this code was written 5 years ago), but it seems we always wanted to log this message for some reason. Our default loggingLevel is "Error", but this message is tagged as a "Warning" since it's not an error. We have a few options of what we could do here:
vscode-cpptools/Extension/src/LanguageServer/references.ts
Lines 471 to 486 in fbf8135
0tii commentedon Dec 17, 2024
Bob Brown (@bobbrow) thank you a lot for the fast turnaround, I think approach 3 seems to be the most viable one here. It would allow users to hide the log with loggingLevel "None" while still keeping its significance (seems like there was some thought behind it as you mentioned) through being printed as Error, while requiring the least amount of work to implement (from my non-extension-developer standpoint).
bobbrow commentedon Dec 17, 2024
Thanks. I was actually leaning towards 1 being the easiest and also doesn't hide the warning since we do want people to at least see it if they actually look at their logs. We just won't throw it in your face. 4 seems like the best approach if we can find a way to get the message in the tool window tactfully. I believe Visual Studio has a similar approach.
The question that follows is why you are seeing it so much. Usually our indexing happens pretty quickly, but perhaps do you have a very large workspace with hundreds of thousands of source files? This message should eventually stop happening when we complete the first pass of indexing, but perhaps you are using Find all References a lot before it completes. Or perhaps there is some other problem causing you to be stuck in a bad state that no one else has run into yet.
bobbrow commentedon Dec 17, 2024
I could also add a fifth option:
sean-mcmanus commentedon Dec 17, 2024
What is triggering the find all references request? What is causing tag parsing to not finish? Those seem like the root problems. The message is supposed to appear when a user invokes find all references (which shouldn't happen frequently) and tag parsing is still happening (it should stop). Otherwise, the find all references operation may be missing results. If we don't show the message, users may not realize the References results are missing values.
0tii commentedon Dec 18, 2024
I have no idea what i causing it, my settings and configs are in the dump in the issue body, I also don't run into any IntelliSense problems which could result from the incomplete workspace parsing. The paths in my includePath also don't contain a lot of files. I would love to find the root cause of this issue, but while I can not do so, I feel like constantly being interrupted by a popup terminal isn't a viable path.
The core of my issue is though, that even at loggingLevel "None" this pops up. A user has to manually specify to not even be alerted of "Error" when putting logginLevel "none" which, in my opinion, should suffice. The log message is also visibly tagged as "Warning", semantically quite explicitly grouping it into the "Warning" loggingLevel.
I personally am not affected in my DX from the incomplete workspace parsing, but I am very well being constantly interrupted by a warning log that does not respect the loggingLevel setting, pops up my exyplicitly closed terminal, and is impossible to disable.
0tii commentedon Dec 18, 2024
Bob Brown (@bobbrow) you are correct, 1. seems to be the most efficient solution, for some reason I thought you said that the extension API doesn't allow for this behavior, but I must have mangled some comments I read around the same time in different issues here.
bobbrow commentedon Dec 18, 2024
Option 1 has been implemented and will be included in the 1.23.3 pre-release.
sean-mcmanus commentedon Jan 10, 2025
Daniel Rauhut (@0tii) Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.23.3 (pre-release).