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
Deprecated APIs message does not suggest replacements #14494
Comments
In this case, I the "how do I fix" is to replace queryAll() with querySelectorAll(). I presume this could be derived from the rest of the message and added on at the end. |
This is a general SDK-documentation concern. Assigning to DartDoc, perhaps when generating the DartDoc, anything marked as deprecated should also somehow be required or encouraged to provide a way to not use the deprecated method? Removed the owner. |
Added Pkg-DartDoc label. |
Removed Area-DartDoc label. |
Removed Pkg-DartDoc label. |
Removed this from the 1.6 milestone. |
This might fall in the general ballpark of generating better doc comments. I'll grab it for the moment. Set owner to @alan-knight. |
This issue was originally filed by LukeEChur...@gmail.com
E.g. add queryAll("");
The popup text reads:
"ElementList queryAll(String relativeSelectors)
Alias for [querySelectorAll]. Note this function is deprecated because its semantics will be changing in
the future."
This is unhelpful, esp. as we have published documents (https://www.dartlang.org/docs/dart-up-and-running/contents/ch03.html) suggesting that this is correct.
As per the guidance https://codereview.chromium.org/21242002/diff/20001/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
to the compiler team, error messages need to state:
1. what is wrong
2. why is it wrong
3. how do I fix
As such recommend:
For such an essential API the lack of (3) is a serious defect.
======
Putting this under editor to start with - but I suspect it may need to be moved to another area.
The text was updated successfully, but these errors were encountered: