Broken since 2024.03.12.0.1
Description of the bug:
Update from 2024.02.27.0.1 to 2024.03.12.0.1 broke it. Project opens but I see new warning like "Warning:Issues collecting info from C++ compiler" and it can not resolve references/links in the file (so highlight lots of code with red cursive), so basically all the navigation within project is broken. Manually downgraded back to 2024.02.27.0.1 and it works again.
@enovozhilov @ujohnny I was told to mention you here about this issue
Which category does this issue belong to?
CLion
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which Intellij IDE are you using? Please provide the specific version.
CLion 2023.2.3
What programming languages and tools are you using? Please provide specific versions.
c++17
What Bazel plugin version are you using?
2024.02.27.0.1
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
@cyberrbob thank you for reaching out to us here, could you please invoke "Show compiler info" action on the file with red code, do you have many -ibazel there? Another option -- could you please enable "Resharper" engine in Advanced settings and see if there's no red code?
I am encountering the same issue with CLion 2023.3.4 and Bazel plugin version 2024.03.26.0.1.
The only thing of note in "show compiler info" is a long command beginning with:
/tmp/blaze_compiler.sh -xc++ -O0 -g -gz -std=c++23 -pthread -Wall -Wextra -Wconversion -Wno-unused-parameter
(etc. with more compiler flags, then include directories, etc.)
about which the logs say:
2024-04-24 22:06:22,402 [ 898255] WARN - #com.google.idea.blaze.cpp.BlazeCWorkspace - Issues collecting info from C++ compiler. Showing first few out of 6504:
[Compiler exited with error code 126:
When I try to run that command manually, it gives me this terminal output:
bash: /tmp/blaze_compiler.sh: Argument list too long
and gives the expected error code of 126.
My CLion log says there are 124,959 matches for -ibazel in the log file, I'm not sure how many are in that one compiler command vs elsewhere in the log file.
There is no mention of "Resharper" in my CLion's advanced settings.
@SimplyTheOther thanks a lot for sharing the details, I guess the threshold is quite clear for us. There's a (not so good) workaround available in the released version mentioned here https://github.com/bazelbuild/intellij/issues/6375#issuecomment-2056368938. And this week we're releasing a version where the workaround is a bit better, see https://github.com/bazelbuild/intellij/commit/fb6624517ad0443d87dafb4adc5b1e83c7e21062 and https://github.com/bazelbuild/intellij/issues/6375#issuecomment-2063365353
Adding that key and resyncing worked, thanks.
Hi, after updating to the latest Bazel plugin version (which I assume is the "better workaround" you mentioned), disabling via that key alone no longer works.
I can only successfully get the files analysed if I explicitly disable both the original virtual includes handling and the new virtual includes handling one.
Hi, just wanted to confirm what @SimplyTheOther previously mentioned, only adding these two lines:
bazel.sync.resolve.virtual.includes=false
bazel.sync.collect.virtual.includes.hints=false
as custom properties fixes the problem. When can we wait a real fix ? Can you please post a ticket number or something for tracking.
We disabled these changes by default with https://github.com/bazelbuild/intellij/pull/6534. If you still experience this issue, please reopen this ticket.
Edit: The fix is available in v2024.07.02-RC-1