PlatformIO Community

Editor suddenly unable to find header files (red squiggles)

I have a project with two environments: nano_33_iot and native.

In the native environment I have unit tests in a directory {project root}/test/native. Up until today, everything was working fine. Then I’m not sure what I did, but now the .cpp files for my tests show “File not found” for all the library headers (specifically unity.h and all libraries that reside under {project root}/lib). This problem only shows up in the editor. If I run the tests (either in CLion or from the CLI) they work fine. The errors in the editor also go away if I switch the configuration from “PlatformIO Test” to “Z_DUMMY_TARGET”.

I’ve tried running Tools -> PlatformIO -> Re-Init, Tools -> PlatformIO -> Update All, and Tools -> CMake -> Reload CMake Project, all to no avail.

I’ve also tried re-running pio init --environment native from the CLI.

I’m running CLion 2020.2 on macOS Big Sur (11.0.1).

pio --version gives me PlatformIO, version 5.0.3

Update: I initially stated that the nano_33_iot environment tests were showing up correctly, but it seems I was mistaken. All tests, regardless of environment, are showing squiggles in the editor. The code under {project root}/lib does work correctly.