When using Github for version control and backup, I added almost all automatically generated CLion configuration files to the git ignore list. The only project directories I’ve added to the repo are lib, src, CMakeLists.txt and PlatformIO.ini. I figured doing this would reduce the clutter of the project’s file structure and make it easier to clone or pull from.
While doing this, I deleted the local project configuration and build files from my hard drive after I had performed an initial push to a new repository. At first I thought this was no problem-- I can just go to Tools->PlatformIO->Re-Init. PlatformIO will auto-generate the needed files for me and fix the problem. This is the case but with some caveats.
I can right click Platformio.ini in my project and build my project just fine from there. However, Clion is still complaining that all my scripts are not part of my opened project and code syntax highlighting may be disabled, when in reality it is working just fine. Despite re-initializing the project, checking for updates, restarting the program, running in admin mode-- I cannot get rid of this prompt and it is driving me crazy. Additionally, it seems as though the configuration files for debug and upload are broken. They are greyed out and I can no longer upload to the board or run the debugger. Again-- I can build the project successfully without a problem. This just seems to be an issue with PlatformIO’s configuration and the IDE’s configuration not communicating properly.
I created a new Arduino project from the PlatformIO project menu to see if I could compare the configuration files side by side and detect any major differences. They were the exact same, with the exception of the project name (since the new dummy comparitor project had to have a different folder name of course). The new project allows me to run the build/upload configurations just fine, so I am deeply confused how to fix this issue or implement syncing code across development environments (such as from desktop to laptop) when using Github.
What is going on here? How does Clion run the build or upload configurations and how are they linked to PlatformIO and it’s files?
My project/repository in question can be found here