-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add fix for override macro check on ESP32 atm #28
Conversation
The ESP32 core changed its It seems to me that PlatformIO needs to be updated to match the current ESP32 API. I'm not inclined to fix this in AceCommon, because this causes warning messages to be generated on ESP32 core >= 2.0.3. |
I think that makes sense. Is there a workaround to make it support both versions though, with some sort of version checker in the ifdef macro? |
If there is a |
I agree completely. I don't see any option in PlatformIO to change that version, and it looks like a stale debate since 2021. Low chance I'll be able to force an upgrade on a major version number like that (they're still on v1.0.x) |
I don't know anything about the PlatformIO community, but I find that to be an odd situation. If they choose to remain stuck in the v1.x version of ESP32 Core, then over time, more and more 3rd party Arduino libraries will become incompatible with PlatformIO, since those will written and tested against v2.x. As for me, I don't use PlatformIO, I really don't want to spend any extra effort writing, reviewing, and testing any code specifically for PlatformIO. You are free to fork your own copy of AceCommon and add what you need to make things work for you. If the code is minor, I may consider accepting a pull request, but I am reluctant to spend much mental energy on PlatformIO. I got limited time, and I have to pick my battles. |
One additional thought: If I recall, I actually use the fact that |
All sounds reasonable to me. Thanks for your contributions to these projects! The most infuriating part is that I just need it to compile; I don't even need to use this darn function |
I really hope that you can push PlatformIO to fix this. It's bad enough that, as a library developer, I have to remember all the idiosyncratic differences of the various flavors of the "Arduino API" implemented by 3rd party Cores (Arduino, Adafruit, ESP8266, ESP32, Seeeduino, Teensyduino, Sparkfun, etc.) But now you are telling me that PlatformIO may be implementing those 3rd party Cores differently. Which increases the number of variations by a factor of 2X. That's too much. As far as I can tell, PlatformIO piggybacks on top of the 3rd party Arduino library ecosystem. I would have thought that it would be their top priority to be as compatible and up-to-date as possible with the various Arduino Cores for the various microcontrollers. |
I mean, Platform.io isn't doing it completely differently; they're just using an older version of the API to avoid making a breaking change. But I agree. |
I'm surprised that PlatformIO does not provide a mechanism for selecting the ESP32 core version. Then the end-user can make that choice. Anyway, now that I understand that they are using the same source code as the ESP32 Arduino core, I'm willing to add a conditional, like this: #if ... \
|| (defined(<<PLATFORM_IO>>) && defined(ESP32))
void flush() {
#else
void flush() override {
#endif Just let me know what that |
The macro is called Some other useful macros to reference may be: Thank you for working to solve this issue. Really appreciate it. |
I believe the Let's go with As far as I am aware, the ESP8266 always defined its |
Changes made, pushed, and tested! Thank you! |
Released v1.6.2 with this fix. |
Appears to fix this issue: bxparks/AceTime#114
Perhaps there's a better solution to use though