-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Excluded files shouldn't be included in the symbol resolution. #4095
Comments
Can you try running the Rescan Workspace command? We might have a bug with updating the symbols right away after the files.exclude changes. |
Oh, actually, we disable file-based excludes by default. You can re-enable that via changing the C_Cpp.exclusionPolicy setting. |
@sean-mcmanus (Thanks for your quick response!) Adding But for below scenario, the issue remains. What I change:
Folder/file structure: (settings.json)
Then we can see the (c_cpp_properties.json)
Then reset the intellisense DB and rescan the workspace. The Goto definition for It seems the And btw, I am not using tag parser. I am using the |
Hmm...I'm not reproing the bug. The files.exclude is correctly ignoring the browse.path. Are you able to view the debug logs (https://code.visualstudio.com/docs/cpp/enable-logging-cpp) to see @Colengms @michelleangela Can any of you repro this? |
As far as the workspace explorer is concerned, the The |
(@sean-mcmanus , @Colengms , @michelleangela ) I create a repo to reproduce this issue: https:/smwikipedia/fileExclude To ease the mind, I draw an illustration of the general folder structure. There are 2 alternative calls for the same function named Steps:
|
@smwikipedia Thanks for the detailed repro steps. The issue in No. 6 is caused by your browse.path being empty ([]) -- that causes us to not parse any files unless they're opened, which is why doing step 7 fixes it for you. Changing that to be Okay, I repro the bug in No. 10 now -- investigating (something is causing the files.exclude check to be skipped) -- it's a case sensitivity bug on Windows. |
@sean-mcmanus Many thanks for the response. The reason I didn't put As I tried, putting the And even more, putting the Could you tell me more about the Windows sensitivity bug so I may work around it for now? Or should I wait for the new release? |
The bug we fixed for our pending release (either Tuesday or Wednesday) is the bug with files.exclude failing to work. I don't understand what other change is desired. You can use "${workspaceFolder}/*" if you want the browse.path to be non-recursive. Then you can add whatever subfolders you want to the browse.path to add more paths for the symbols you care about finding. The database should normally be saved after a reload and not require reparsing. |
…ms I cannot leave the browse.path to []. This issue can only be perfectly fixed on VS Code side. I have to wait.
In my scenario, I didn't put either I only put the folders I care about in it. These folders are those containing files that indeed participated in a build. If the fix can make |
You don't need ${workspaceFolder} in the path, but it probably should not be blank, i.e. you could use "folder2" or "${workspaceFolder}/folder2". |
I guess you mean I put the The excluded I believe the fix to make I will wait for the new release. |
Should be fixed with 0.25.0. |
… it. We can only use "/" for path separator. "\\" still not working. microsoft/vscode-cpptools#4095
@smwikipedia Looks like the |
Type: LanguageService
Describe the bug
I have a folder containing below files. The
func1.c
andfunc2.c
contains 2 functions definitions. They are for the same function name but with different implementation.Below are the folder/file details.
(func.h)
void func();
(func1.c)
(func2.c)
(main.c)
I use
files.exclude
to exclude one of the c files,func2.c
from workspace. And thefunc2.c
disappeared from the workspace explorer indeed.(settings.json)
I expect the file parsing / symbol resolution should do the same exclusion when looking for definition for
func()
.But actually, after I reset the intellisense database, definitions from both
func1.c
andfunc2.c
are still listed.OS and Version:
VS Code Version:
Version: 1.37.0 (user setup)
Commit: 036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8
Date: 2019-08-08T02:33:50.993Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.16299
C/C++ Extension Version:
0.25.0-insiders2
Other extensions you installed (and if the issue persists after disabling them):
A clear and concise description of what the bug is.
To Reproduce
Expected behavior
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: