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

Extra IntelliSense errors caused by include paths and precompiled headers #6866

Closed
rpjohnst opened this issue Jul 10, 2020 · 2 comments · Fixed by #6897
Closed

Extra IntelliSense errors caused by include paths and precompiled headers #6866

rpjohnst opened this issue Jul 10, 2020 · 2 comments · Fixed by #6897
Assignees
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@rpjohnst
Copy link

Environment

Windows build number: 10.0.18363.0
Windows Terminal version (if applicable): master branch, commit fc083296b98a2c45126da7a0a61a2ccb37786e48
Visual Studio 2019, 16.6

Steps to reproduce

  • Clone the project as described in the README.
  • Open OpenConsole.sln in Visual Studio, switch the platform from "Any CPU" to "x64," and build the TerminalAppLib project.
  • Open TerminalPage.cpp (under controls/TerminalPage.xaml in the solution explorer).

Expected behavior

IntelliSense should not show any errors/red squiggles, given that the build succeeded.

Actual behavior

IntelliSense finds the wrong pch.h file and goes on to produce a few hundred errors about missing definitions.

Specifically, it finds src\cascadia\TerminalApp\pch.h instead of src\cascadia\TerminalApp\lib\pch.h. You can confirm this by using Go To Definition/F12 on the #include "pch.h" at the top of TerminalPage.cpp. Changing this to #include "lib/pch.h", or making an equivalent change to the project include paths, lets IntelliSense find the right header and all the errors disappear.

The build succeeds because the compiler does not use the usual include path search for this header when PCH is enabled, while IntelliSense fails because its PCH implementation does not work this way.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 10, 2020
@DHowett
Copy link
Member

DHowett commented Jul 10, 2020

This is the first time we've ever had a lead on exactly why IntelliSense is busted in our project. Thank you!

@DHowett DHowett added Area-Build Issues pertaining to the build system, CI, infrastructure, meta Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. labels Jul 10, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 10, 2020
@mpela81
Copy link
Contributor

mpela81 commented Jul 11, 2020

Thanks @rpjohnst for filing this following my post on Developer Community!

@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 13, 2020
@zadjii-msft zadjii-msft self-assigned this Jul 13, 2020
@ghost ghost added the In-PR This issue has a related PR label Jul 13, 2020
@ghost ghost closed this as completed in #6897 Aug 20, 2020
@ghost ghost removed the In-PR This issue has a related PR label Aug 20, 2020
ghost pushed a commit that referenced this issue Aug 20, 2020
The easiest fix was actually just moving all the source files from
`TerminalApp` to `TerminalApp/lib`, where the appropriate `pch.h`
actually resides.

Closes #6866
@ghost ghost added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Aug 20, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build Issues pertaining to the build system, CI, infrastructure, meta Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants