-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Rename wled00.ino to wled_main.cpp #4090
Conversation
This fixes platformio continually recompiling this file.
Thanks @willmmiles I think its reasonable to cut the last ropes for arduino IDE - @blazoncek what do you think? |
TBH IDK. 🤷♂️ |
Bystander comment: "Yes, please." It gives arbitrary editors a better chance of recognizing the file as C++ and helpfully syntax highlighting it. GitHub, for example, has lots of tools that can automatically recognize .cc and .cpp files. Not to lose focus, but if renaming it is on the table, why the "00" at all? Would a better name be considered? wled_effects.cpp or ... anything more meaningful. |
@robertlipe the "00" is a relic from ArduinoIDE - Arduino expects to find the main sketch in |
* added #include <Arduino.h> - this is basically what the preprocessing tool (wled.ino -> wled00.ino.cpp) does * added a comment that Arduino IDE is not supported, use platformIO.
I don't do Arduino when I can at all avoid it and avoiding their IDE is easy, so that history is new to me. (The whole concept of renaming 'char', not calling source files source files, reinventing STL ... badly, and such is just weird to me.) Thanx for the explanation. Yes, I think that's a better name. It's just something that's always bugged me, so if you're making the move to rename it, might as well make it count. Note that I'm not a project owner, so my opinion may not count. |
🤔 my first local build ended with "NeoPixelBusLg.h not found". After deleting @willmmiles @blazoncek can you double-check that local builds still work for you? |
It built just fine for me, no trouble at all. I tried a couple of things to see if I could get it to fail -- building 0_15, then switching to this branch, then building without reconfiguring PlatformIO, and it still succeeded. |
Rename wled00.ino to wled_main.cpp
PlatformIO's Arduino compatibility shim forces an intermediate .cpp file to be recreated and rebuilt on every build. Apart from being wasteful of time, this can also cause problems when batch building at the command line when the VSCode IDE is trying to build the cpp plugin configuration, resulting in failed builds as the intermediate file is rewritten while being built.
As the Arduino IDE is no longer supported by this project, it should be safe now to rename the .ino to eliminate these small headaches.