-
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
IntelliSense stops working "Quick info operation failed: FE: 'Compiler exited with error - No IL available'" when an #error is hit on Linux/Mac #6114
Comments
Can you provide the results of C/C++: Log Diagnostics? The error means our parser hit an unrecoverable error. It's possible the project in not configured correctly. Can you check whether the results of the Log Diagnostics match what you're using to compile the code with in regards to the includePath ordering? We've received other reports of this at #6009 . |
In particular, the error is most likely occurring in a header file, which may have been "recoverable" in 0.29.0, but then due to undefined behavior in regards to how error handling is done, it could cause it to fail in 0.30.0-insiders, because the parser might be in a state where it can't continue to give additional errors due to previous errors (in the headers, not shown in the opened source file that his hovered over). If we implemented #3873 , then the errors in the header files would most likely make the issue easier to diagnose. |
OK, back at work, could launch the C++ diagnostics. Yes, it complains about potentially duplicate headers, but it is (only) in the system headers, don't know what / how I could change to remove these: C++ diagnostics
If I remember right, not adding /usr/include/** to the includePAth was giving (at least in some previous version) errors on the system includes... I now checked what happens if I remove it from the c_cpp_properties.json: C++ diagnostics with reduced includePath
As you can see, the 'Potential include path issues' disappeared, but the
error remains, as well (of course) as the incorrect and/or missing IntelliSense information... |
You definitely don't want to use "/usr/include/**" because system includes are order dependent, so you'll get a random order which is likely to not work. Can you check if the includePath ordering you're using matches what you compile with? i.e. does running the following compile without errors?
If so, do you get IntelliSense errors when you run the command below and open BasicTest.out.cc
Or if you build system include other changes you could modify those commands to get it to build. |
The first compilation does in fact fail, but not because of include file ordering, but because of a missing -D_RWCONFIG=m for the RogueWave class library. Once I add it to the workspace's "defines", IntelliSense is working again. also with the Insiders version (now at 1.0.0). So at least in my case, I can confirm that the underlying error was in the configuration itself, which previous versions seems to have handled more gracefully. In the meantime, I had also figured out how to have CMake generate a compile_commands.json, using which also solved the issue. That was actually so easy that I am really wondering why I had not done so from the beginning. Maybe it would be a good idea to further stress the advantages of using the compile_commands.json and to include a link on how to generate it. For myself, the issue can be closed, but if you want to dig deeper to find out what exactly has become 'unrecoverable' in the 0.30 release, I am ready to try out more stuff. |
As an additional data point, I am getting the issue in the 0.30 insiders releases AND the 1.0.0 releases, but not 0.29. I am assuming it is some issue in the underlying config for myself as well, and will dig into it, but I am happy to provide info and test. I can also confirm it is not an include file ordering issue. |
@alexclewontin can you try following what @sean-mcmanus and @JeanMiK did to compile the source file in the terminal to see if your configuration is correct? For example:
If the command fails, then there's something wrong with the configuration. I do think it would be helpful if someone could help us get a small repro of the case so we can make sure our parser doesn't fail so dramatically. This is most certainly a change in behavior for the parser and we'd like to get a fix for it. |
@bobbrow We have a repro with /linux/kernel/time/alarmtimer.c with test.h
test.h
If we showed the errors in test.h, the user would see it and make it more obvious that a compile failure occurred. I'm not sure yet why the behavior is different in 0.29.0 though...and it doesn't seem to repro with VS. |
@bobbrow Okay so in my case. a preprocessor Previously when hitting an EDIT: Ah, I see Sean beat me to it with a nearly identical case. |
@sean-mcmanus we should talk with the VS team to get that change reverted. IntelliSense shouldn't die because of an |
We published an insiders release with the fix for this. Please try it out and let us know if you continue to have issues. |
Appreciate you getting it fixed so quickly. Test driving it now |
Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.0.1 . Let us know if you encounter other "No IL" issues. We know of at least one other regression we're still working on: #6166 . |
Type: LanguageService
When hovering over variables, Intellisense does no longer provide correct information with v0.30.0-insiders5.
For some variables, no information is shown at all, for others, it will show incorrect information.
For example, with a local variable
int64_t foo;
it would show declarations of other variables called foo inside the workspace, e.g.
sometimes, but not always, including the correct variable as well.
In the Output, the extension is then always printing
Reverting back to v.0.29 corrects the issue.
I think the issue was already present with previous v0.30 insider versions.
This is on a relatively complex workspace with multiple roots, each in a distinct git repository.
Describe the bug
Steps to reproduce
Expected behavior
Logs
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: