Replies: 1 comment 11 replies
-
Hi @KaeLL . We have had a number of users report issues due to non-standard
Normally, a compiler query is only necessary if the command line is unique in some way other than the input filename (and other known arguments that correspond with that file, such as
Does
Could you provide the C/C++ channel output for that scenario? Does the warning occur when opening a file that does not have an entry in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Before diving into the questions, a little background. I'm developing for an ESP32-based platform with the ESP-IDFramework.
I was curious about how clever the extension is by default after noticing that it was failing to resolve the definition of a function call inside IDF.
Let's begin with my
c_cpp_properties.json
Next is the complete output of the extension at Debug level for reference:
Click here to expand the 1641 lines long log
Now, to the questions.
Line 1234 to 1236 indicate that include folders from my machine will be indexed, regardless of whether
compilerPath
is set or not. WhencompilerPath
is not set, it finds clang on my machine, which won't be used at all, and causes the issue mentioned on question 3 below. Seems clear that the extension doesn't take information solely from thecompile_commands.json
file and it doesn't parse it before stuff like looking for compilers. The question is: why? Seems less than ideal, to say the least? The extension should figure outcompilerPath
,intelliSenseMode
,cStandard
,cppStandard
, and every other configuration that's not specified in thec_cpp_properties.json
file on its own from thecompiler_commands.json
file if the user sets it. Apparently, it already doing this, just not in the ideal order, or am I wrong? It prevents the extension from loading unnecessary crap like compilers that won't be used and their configurations, as well as it allows for more informed decisions down the road that at least help avoid issues (more on this in question 3).In the logs, I get 1004 attempts to get defaults from the compilers, 982 for the C compiler and 22 for the C++ compiler, regardless of whether
compilerPath
is set or not. I also get 25 failures to query the compiler and fallbacks to no bitness (lines 21 to 27 in the log repeatedly), despite manually running the compiler query command with no bitness (no-m32
or-m64
) in my terminal and it working correctly. Why? What's happening with these 2 procedures? Why such a high amount? Is it really failing and trying again that many times? I'm not sure by looking at only the attempts to get the defaults, but from the queries related to the bitness, it seems pretty clear that it's failing all the time, and there's something terribly wrong going on.What's the relationship between
compilerPath
andintelliSenseMode
? Not settingcompilerPath
seems to make the extension go bonkers. I get the warning below. It doesn't really make sense. Granted, I do have clang on my machine, but it defaults to the x86 variant? Why? Is it a middle-ground between my choice and the fact that it found clang in my x64 machine? And it doesn't change it back after parsingcompile_commands.json
as per the fact that it doesn't give me another warning saying it changed back. What's with it?Beta Was this translation helpful? Give feedback.
All reactions