-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Spurious triggers of hardcoded Udp -> EthernetUdp migration error enhancement causes confusion #8385
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
Comments
Huh? Can you show the full error that you get? I'm wondering how that error is generated, I'm not aware of any compiler errors about "renaming" variables? |
Try it yourself. Here's all you need:
And you get the following error:
|
This is a problem with the "fancy errors" that are handled by the IDE trying to be friendly with the user (see Arduino/arduino-core/src/cc/arduino/Compiler.java Lines 554 to 557 in b5bfe08
Some of them don't even apply anymore or are related with 0.x -> 1 transition (which happened eons ago) so getting rid of them shouldn't harm too much. @cmaglie what should we do? |
I guess it's time to remove them. |
I know this is an old thread but it just saved me. |
Arduino often calls static methods like Wifi.begin(). When reading the documentation on Arduino's WiFiSendReceiveUDPString page, if you don't pay attention to the declaration "WiFiUDP Udp" you will assume that the "Udp" in the code samples is a static class.
Not a problem though, if you don't declare "WiFiUDP Udp", you will just get an error that variable is missing, right? No. You get the error that Udp was renamed to EthernetUdp. And now you're off on a wild goose chase trying to figure out what EthernetUdp is and where to get that library.
My suggestion is either change the documentation and set "WiFiUDP udp", making it obvious that "udp" is a variable, or remove the error that says Udp has been changed to EthernetUdp and make it clear that the variable is not declared.
The text was updated successfully, but these errors were encountered: