-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Make "why not promoted" information more discoverable in command-line analyzer #44904
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
I'm not sure who to assign this to. Perhaps @bwilkerson? |
I believe the above is showing the output for Paul, do you mind re-running the above example w/ |
As of 86636af, with
(Note that the path is slightly different from the output I pasted into the bug description; I had to move the test file into a subdirectory to work around #44910). Without
|
Thanks! The above list of ideas looks good. Wrt the specific error's text:
We might want to write the message w/o the use of the word 'here'. The CLI tool can strip off any trailing sentence punctuation (as it does for the regular issue text). If we use relative paths for the location and tweak the error text, we might end up with something like:
Note that the error text is now |
Good idea, thanks! I'll take responsibility for changing the error message text. |
https://dart-review.googlesource.com/c/sdk/+/184104 for some of the cleanup mentioned above. |
The new message phrasing should flow better, especially in the analyzer CLI. For the motivation for this change, please see #44904 (comment) Bug: #44898 Change-Id: I595492c64b42aff25cae5a8936c32aa8a218edd8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184601 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Paul Berry <[email protected]>
@devoncarew As of 7fc9a1a it looks like both |
Yes, this is likely to land in the next few days - |
@devoncarew any news? |
Yes, this did land. |
@devoncarew it looks like only the behavior of Can we get both tools changed? It sounds like there's still at least several months before the |
@devoncarew any update on this? |
Hey - I was't planning on adding this to Can you open a separate issue for dartanalyzer? If you feel strongly about this that would influence whether we add support, but I suspect this is more a completeness thing than a gating factor for the overall feature. |
Ok, I filed #45546 requesting to backport the support to |
(Parent issue #44897)
As of a42244f, the analyzer now generates context messages in some circumstances explaining why type promotion failed.
dartanalyzer
anddart analyze
expose these messages to the user only when the--verbose
option is provided, and the format is not easy to read, e.g.:By contrast, the CFE output looks like this:
Yesterday we discussed some ideas for how we might improve the presentation of these context messages in the command line analyzer output, such as:
^
symbols pointing to a particular location on the line--verbose
is supplied)The text was updated successfully, but these errors were encountered: