arduino / arduino/Arduino

Spurious triggers of hardcoded Udp -> EthernetUdp migration error enhancement causes confusion

Open
#8,385 5 comments 1 reaction 0 assignees View on GitHub
Component: IDE Component: IDE user interface Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

Arduino often calls static methods like Wifi.begin(). When reading the documentation on [Arduino's WiFiSendReceiveUDPString page](https://www.arduino.cc/en/Tutorial/WiFiSendReceiveUDPString), 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.

Contributor guide

Open the contributing guide

Research direction

Review the linked WiFiSendReceiveUDPString documentation and locate the Arduino IDE diagnostic that rewrites `Udp` to `EthernetUdp`. Decide between clarifying the documentation with `udp` or correcting the diagnostic, then verify that an undeclared variable produces a clear missing-variable error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.