Vscode-cmake-tools: 1.7.0 breaks IntelliSense

Created on 20 Apr 2021  路  13Comments  路  Source: microsoft/vscode-cmake-tools

Brief Issue Summary

I am getting include errors in my project with 1.7.0. Works fine with 1.6.0.

I can provide logs etc. on request, I don't know which parts would be of interest for this issue.

Platform and Versions

  • Operating System: Windows
  • CMake Version: 3.19.1
  • VSCode Version: 1.55.2
  • CMake Tools Extension Version: 1.7.0
  • Compiler/Toolchain: arm-none-eabi-gcc 9.3.1 & GCC 8.1.0
cpptools integration IMPORTANT bug fixed (release pending) regression

Most helpful comment

You can download a VSIX with the patch here: https://github.com/microsoft/vscode-cmake-tools/suites/2541930767/artifacts/55189979

Then use the "Install From VSIX" command in VS Code to install the patch. Please let us know if this works for you or if the issue persists. Thank you!

All 13 comments

I'm working on a minimal project to reproduce the issue.

I can reproduce the issue with this basic setup:

main.c

#include "bar.h"

int main()
{
    return 0;
}

Empty foo/bar.h

CMakeLists.txt

cmake_minimum_required(VERSION 3.19)

project(foo)

add_executable(foo main.c)

target_include_directories(foo PRIVATE ${CMAKE_SOURCE_DIR}/foo)

.vscode/settings.json

{
    "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
}

#include "bar.h" is marked with an error after configuring and reloading the window.

the same problem here :-)

I can confirm that it is broken also on my side. I think that this do not affect all the opened files.

In some I have "some kind of autocomplete". While in others I have a "no suggestions" label

Thanks for the repro, we'll work on this today.

Thanks for the repro, we'll work on this today.

Only an add: I made a rollback of the extension to the previous version and everything works as expected.
I did not touch any other extension in the meanwhile.

Thank you!

I have a PR out for this. We'll put this in the 1.7.1 patch. If you are willing to help us validate it, the VSIX will be in the Actions tab after the PR is complete. I'll add a link here when it's ready.

(keeping the issue open until we release)

You can download a VSIX with the patch here: https://github.com/microsoft/vscode-cmake-tools/suites/2541930767/artifacts/55189979

Then use the "Install From VSIX" command in VS Code to install the patch. Please let us know if this works for you or if the issue persists. Thank you!

The problem is solved now. IntelliSense is working.
Thanks!

You can download a VSIX with the patch here: https://github.com/microsoft/vscode-cmake-tools/suites/2541930767/artifacts/55189979

Then use the "Install From VSIX" command in VS Code to install the patch. Please let us know if this works for you or if the issue persists. Thank you!

This fixed for me.

You can download a VSIX with the patch here: https://github.com/microsoft/vscode-cmake-tools/suites/2541930767/artifacts/55189979

Then use the "Install From VSIX" command in VS Code to install the patch. Please let us know if this works for you or if the issue persists. Thank you!

Sorry for the late reply
I would like to confirm that this fixed for me too. Thank you.

CMake Tools 1.7.1 was released today and it contains a fix for this issue. Upgrade the extension in VSCode and let us know if you encounter any other problems.

Was this page helpful?
0 / 5 - 0 ratings