Skip to content
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

Use cached cmake-file-api response to configure IntelliSense on startup #1149

Closed
ghuser404 opened this issue Mar 31, 2020 · 3 comments · Fixed by #1909
Closed

Use cached cmake-file-api response to configure IntelliSense on startup #1149

ghuser404 opened this issue Mar 31, 2020 · 3 comments · Fixed by #1909
Assignees
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure Feature: cpptools integration
Milestone

Comments

@ghuser404
Copy link

I have configureOnOpen set to false, because I don't want it to happen automatically. However, I still expect to not see red squiggles when i open my project. To make them go away I need to configure project every time I open it.

The errors are with includes: this show for first unrecognized include #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\foo.cpp). and this show for every include cannot open source file "include/bar.h"

@bobbrow
Copy link
Member

bobbrow commented Mar 31, 2020

That is currently the designed behavior. CMake needs to configure in order for the code model to be generated so that IntelliSense configurations can be provided. This is also the root cause for your other issue #1148.

We need to do the work to persist the configurations. Fortunately, with cmake-file-api (CMake 3.14.6+), they are already persisted. We could easily just re-read them if the configure step has not happened yet.

@bobbrow bobbrow added enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure Feature: cpptools integration labels Mar 31, 2020
@bobbrow bobbrow added this to the On Deck milestone Mar 31, 2020
@ghuser404
Copy link
Author

Yeah, I figured they are somewhat related. I probably wouldn't be as concerned if configuring a project would be a little easier, i.e. currently it's select CMake Tools extension -> press configure -> go back to Explorer view. I particularly don't like switching between views just to configure project. Another way, of course, is to use variants, i.e. press on variants -> select variant. But that requires to go through the list of variants and press on the one that you were previously working. Maybe there is an easier method that I just don't know about.

Overall, I'm quite happy with the extension, but I just think UI could be a bit better :)

@KyleFromKitware
Copy link
Contributor

+1 for reading from the existing File API response on startup.

@bobbrow bobbrow changed the title IntelliSense is broken on start up Use cached cmake-file-api response to configure IntelliSense on startup Apr 27, 2021
@bobbrow bobbrow modified the milestones: On Deck, 1.8.0 Apr 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure Feature: cpptools integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants