Skip to content
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 overloads to support __FlashStringHelper like ESP8266 has them. #8111

Merged
merged 3 commits into from May 3, 2023

Conversation

dok-net
Copy link
Contributor

@dok-net dok-net commented Apr 23, 2023

Fixes #8108

@CLAassistant
Copy link

CLAassistant commented Apr 23, 2023

CLA assistant check
All committers have signed the CLA.

@dok-net dok-net marked this pull request as draft April 23, 2023 15:41
@github-actions
Copy link
Contributor

External libraries build test

Library ESP32 ESP32C3 ESP32S2 ESP32S3
Adafruit NeoPixel 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
ArduinoBLE 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ N/A 1 ✅ -> 1 ✅
ESP32Servo 4 ✅ -> 4 ✅ 4 ✅ -> 4 ✅ 4 ✅ -> 4 ✅ 4 ✅ -> 4 ✅
ESPAsyncWebServer 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 4 ❌ -> 4 ❌ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️
FastLED 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
IRremote 1 ⚠️ -> 1 ⚠️ 1 ❌ -> 1 ❌ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅

@VojtechBartoska VojtechBartoska added the Priority: High 🗻 Issues with high priority which needs to be solved first. label Apr 24, 2023
@github-actions
Copy link
Contributor

External libraries build test

Library ESP32 ESP32C3 ESP32S2 ESP32S3
Adafruit NeoPixel 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
ArduinoBLE 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ N/A 1 ✅ -> 1 ✅
ESP32Servo 4 ✅ -> 4 ✅ 4 ✅ -> 4 ✅ 4 ✅ -> 4 ✅ 4 ✅ -> 4 ✅
ESPAsyncWebServer 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 4 ❌ -> 4 ❌ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️
FastLED 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
IRremote 1 ⚠️ -> 1 ⚠️ 1 ❌ -> 1 ❌ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅

Copy link
Collaborator

@mrengineer7777 mrengineer7777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restores previous definitions for F and FPSTR in Wstring.h. This should fix breaking changes in other libraries. I'm not sure about the other changes introduced by this PR.

@me-no-dev
Copy link
Member

Can you pease split the changes into separate PRs. There seem to be three unrelated changes.
F() used to be #define F(string_literal) (FPSTR(PSTR(string_literal)))

@dok-net
Copy link
Contributor Author

dok-net commented Apr 25, 2023

Can you pease split the changes into separate PRs.

Oh dear, I partly understand where this request is coming from, but honestly, I don't have time on my hands to do this RIGHT until 2 weekends away from now. And I don't know how much better it will be in two or three steps. Seeing the first attempt, just reverting the macros breaks something else. I honestly have to ask you to review this as is, because the dependencies are just there. Of course it could be attempted to find out which of the changes, macros, libs, could perhaps stand without the other, probably the libs because they ADD wrappers now, but for that exact same reason, why not review this PR as it stands, pleeeeze?

I'm sorry the first PR didn't work for some 3rd party libs.

@dok-net
Copy link
Contributor Author

dok-net commented Apr 25, 2023

F() used to be #define F(string_literal) (FPSTR(PSTR(string_literal)))

The reverted macros now just drop the PSTR, becauses it's a dummy on ESP32, and will always be (?):
cores/esp32/pgmspace.h:#define PSTR(s) (s)

@tueddy
Copy link
Contributor

tueddy commented Apr 30, 2023

Please add this to 2.0.9, it's a high visible show stopper

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

External libraries build test

Library ESP32 ESP32C3 ESP32S2 ESP32S3
Adafruit NeoPixel 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
ArduinoBLE 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ N/A 1 ✅ -> 1 ✅
ESP32Servo 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
ESPAsyncWebServer 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 4 ❌ -> 4 ❌ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️
FastLED 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
IRremote 1 ⚠️ -> 1 ⚠️ 1 ❌ -> 1 ❌ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
MFRC522 1 ❌ -> 1 ✅ 1 ❌ -> 1 ✅ 1 ❌ -> 1 ✅ 1 ❌ -> 1 ✅
WS2812FX 1 ❌ -> 1 ❌ 1 ❌ -> 1 ❌ 1 ❌ -> 1 ❌ 1 ❌ -> 1 ❌

@VojtechBartoska VojtechBartoska added this to the 2.0.9 milestone May 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

External libraries build test

Library ESP32 ESP32C3 ESP32S2 ESP32S3
Adafruit NeoPixel 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
ArduinoBLE 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ N/A 1 ✅ -> 1 ✅
ESP32Servo 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
ESPAsyncWebServer 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 4 ❌ -> 4 ❌ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️ 3 ✅ 1 ⚠️ -> 3 ✅ 1 ⚠️
FastLED 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
IRremote 1 ⚠️ -> 1 ⚠️ 1 ❌ -> 1 ❌ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
MFRC522 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅
WS2812FX 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅ 1 ✅ -> 1 ✅

@me-no-dev me-no-dev merged commit 628b668 into espressif:master May 3, 2023
38 checks passed
@dok-net dok-net deleted the fix_8108 branch May 3, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib_test Run External Libraries Test Priority: High 🗻 Issues with high priority which needs to be solved first.
Projects
Development

Successfully merging this pull request may close these issues.

Compile error under 2.0.8 if library function explicitly returns const __FlashStringHelper * from F() macro
6 participants