You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clangd no longer works correctly after the staging-next merge. Including any standard header, e.g. <iostream>, fails with an error like 'iostream' file not found (clang pp_file_not_found). This is another bug that cropped up during the staging-next merge at de21549 (#457894).
Steps to reproduce
It's a bit hard to reproduce this from scratch, so I've taken two steps:
I made a simple demo that has a shell script that will rapidly reproduce the problem. Check the README.
I made a NixOS test (nixosTests.clangd: init #463366) based on this that I will try to get merged as soon as it passes again.
But in short, the problem occurs with almost any clangd setup I can find: clangd is no longer able to find include files after the staging merge. This seems to also be the case for any version of clangd I could find.
Expected behaviour
clangd should work I hope :)
Screenshots
No response
Relevant log output
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_file_not_found","message":"'iostream' file not found","range":{"end":{"character":19,"line":0},"start":{"character":9,"line":0}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'std'","range":{"end":{"character":5,"line":2},"start":{"character":2,"line":2}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'std'","range":{"end":{"character":37,"line":2},"start":{"character":34,"line":2}},"severity":1,"source":"clang"}],"uri":".../main.cpp","version":0}}I[23:03:57.286] --> reply:textDocument/documentHighlight(1) 11 ms
Additional context
No response
System metadata
system: "x86_64-linux"
host os: Linux 6.17.7, NixOS, 25.11 (Xantusia), 25.11.20251116.50a96ed
Nixpkgs version
Describe the bug
clangdno longer works correctly after the staging-next merge. Including any standard header, e.g.<iostream>, fails with an error like'iostream' file not found (clang pp_file_not_found). This is another bug that cropped up during the staging-next merge at de21549 (#457894).Steps to reproduce
It's a bit hard to reproduce this from scratch, so I've taken two steps:
But in short, the problem occurs with almost any clangd setup I can find: clangd is no longer able to find include files after the staging merge. This seems to also be the case for any version of clangd I could find.
Expected behaviour
clangd should work I hope :)
Screenshots
No response
Relevant log output
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_file_not_found","message":"'iostream' file not found","range":{"end":{"character":19,"line":0},"start":{"character":9,"line":0}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'std'","range":{"end":{"character":5,"line":2},"start":{"character":2,"line":2}},"severity":1,"source":"clang"},{"code":"undeclared_var_use","message":"Use of undeclared identifier 'std'","range":{"end":{"character":37,"line":2},"start":{"character":34,"line":2}},"severity":1,"source":"clang"}],"uri":".../main.cpp","version":0}}I[23:03:57.286] --> reply:textDocument/documentHighlight(1) 11 msAdditional context
No response
System metadata
"x86_64-linux"Linux 6.17.7, NixOS, 25.11 (Xantusia), 25.11.20251116.50a96edyesyesnix-env (Nix) 2.31.2"nixos"""/nix/store/c9asdiqw1rf5qwdjz26f57hp68ppb8fc-sourceNotify maintainers
@Patryk27
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.