I’ve been working on a project for a few days, my first using VSCodium and PlatformIO, and have really been enjoying the experience. But just now, I went to read something in a GitHub repo, and then when I tried to to alt+tab back to PlatformIO both my windows were gone (I run the editor in a separate window, because laptop). Odd, I thought, but then I sometimes close things by mistake (with a stray middle mouse click).
But when I started it back up from the program launcher my project wasn’t loaded and the PlatformIO project actions said “You have not yet opened a PlatformIO project”. So I open the project, from the PlatformIO “home”, and things flicker a little, but otherwise nothing changes. In the bottom toolbar I see a folder icon with the text “Loading…” next to it and when I click it I get a small popup that reads “Cannot read properties of undefined (reading ‘envs’)”. In the terminal I can execute platformio run and it will build my project, but platformio run upload gives
platformio run upload
Usage: platformio run [OPTIONS]
Try 'platformio run -h' for help.
Error: Got unexpected extra argument (upload)
The same is true for platformio run monitor etc. I don’t have anything peculiar in my platformio.ini file, just a couple of dependencies and other standard stuff:
I managed to get back to where I was by moving my project folder out of the way, creating a new project in PlatformIO with the same settings (and name) and copying my /src and /lib files back in. I can only guess that the project became corrupted somehow when PlatformIO / VSCodium unexpectedly exited. Seems to be working again now, but I hope this sort of thing doesn’t just randomly happen from time to time - it was pretty annoying and threw me right out of the zone.
I’m not sure why @sivar2311 marked recreating the project as a “solution”; it’s really more of an awkward work-around for an unexplained behaviour. Fine if you only need to do it once, but not if it keeps happening. And guess what.
Just rebooted my laptop after cleanly shutting down all running applications, including PlatformIO/VSCodium. After restarting I am again unable to open my project, with the same symptoms as before.
Yeah, I know, thanks. Sorry if I sounded a little frustrated, but I was I come from using SublimeText (with a few addons) and the command line to a complex dedicated platform tool within a complex IDE with so many moving parts between them I fail to see how anyone could figure out how it all fits together. When it goes wrong you’re left scratching your head and no one - not even the people who built the thing - is able to help. Using the standard toolkits, a simple text editor, and the console, each part can be understood on its own, and learned, scripted, replaced or upgraded individually and at will. VSCode and PlatformIO are admirable for how easy they make things appear (you just click some button), but under the hood it’s still the same old mess of wires - they’re just hidden from view, and consequently much harder to understand.
VSCodium? I thought PlatformIO only ever worked on Microsoft VSCode, due to needing the Microsoft C/C++ extension? Have you tried this in Microsoft VSCode?
Actually, it works fine, you just have to install the Micros~1 extension manually, by downloading it from their “store”. I’m sorry but I cannot accept the VSCode EULA.
I can’t answer for @etaoin, but I used to work at a $VeryLargeCompany where anything that touched source code had to be vetted by legal. Even monthly/quarterly updates for currently blessed deployments were gate-checked and released to dev systems only once deemed acceptable risks.
Perhaps they’re working at a competitor, for example.
Legal interactions between big companies can be awkward.