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

Include file not found... reported for files that don't belong to the project #453

Closed
martincohen opened this issue Jan 18, 2017 · 10 comments

Comments

@martincohen
Copy link

I have opened a file from another project in Code and it keeps reporting Include file not found in include directory. Because it does this, the problem view is never empty and so the cursor for F8 (next error) is not reset for a new build, therefore F8 moves me to next of dozens of Include file not found... issues. That said, the cursor should reset when I'm making a new build (but that is probably an issue for Code itself).

image

@sean-mcmanus
Copy link
Collaborator

If you want the "Include file not found" info message to go away you'll need to add the path to the headers to the IncludePath. Does doing that not work?

@martincohen
Copy link
Author

Well as I've said, the file app.cpp belongs to a different project of mine (and I opened it just for a reference), so I cannot really add include paths, as the file does not belong to the project I'm working on. Also the info doesn't go away if I close the file (and run build).

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Jan 18, 2017

The publishing of the "Include file not found" for non-workspace files is "by design", but I suppose we could add a setting for that later. The fact that it doesn't go away on close can be considered a bug (the didClose updating was never implemented).

@martincohen
Copy link
Author

Can the cursor in Problem view be at least reset when I start a new build?

@sean-mcmanus
Copy link
Collaborator

Our extensions doesn't control the cursor or the UI in the Problems view. You should report the issue on the Microsoft/vscode GitHub page. We just supply the string and Diagnostic info (see https://github.com/Microsoft/language-server-protocol/blob/b082a3bd761f7c50db0b538e954ac467e8aa5ba8/protocol.md#textDocument_publishDiagnostics ).

@martincohen
Copy link
Author

martincohen commented Jan 18, 2017

Okay, thanks for the info, I've added the issue about the cursor reset to vscode: microsoft/vscode#18695

@BillDenton
Copy link

I think I have a similar problem. The file was in the project directory (but not included in normal builds so I hadn't set the include path). After opening and then closing the file, the info message 'Include file not found in include directory' stayed in in problems window. So the issue is that the messages aren't removed when the file is closed. I seen a similar issue for a spelling extension (streetsidesoftware/vscode-spell-checker#54 and python (https://github.com/DonJayamanne/pythonVSCode/issues/634).

@sean-mcmanus
Copy link
Collaborator

The bug where the messages aren't removed onClose has been fixed (in the C++ extension). It should be in the next update.

@martincohen
Copy link
Author

Awesome! <3

@sean-mcmanus
Copy link
Collaborator

In 0.10.0, the "Include files missing" message goes away after the file is closed.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants