-
Notifications
You must be signed in to change notification settings - Fork 124
Miscellaneous warnings enhancements #1421
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
Conversation
@@ -2047,7 +2070,7 @@ abstract class ModelElement implements Comparable, Nameable, Documentable { | |||
bool _isLineNumberComputed = false; | |||
@override | |||
Tuple2<int, int> get lineAndColumn { | |||
// TODO(jcollins-g): we should always be able to get line numbers. Why can't we, sometimes? | |||
/// TODO(jcollins-g): implement lineAndColumn for explicit fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want just a line comment here (//
).
@@ -2770,13 +2787,14 @@ Map<PackageWarning, List<String>> packageWarningText = { | |||
|
|||
// Something that package warnings can be called on. | |||
abstract class Warnable implements Locatable { | |||
void warn(PackageWarning warning, [String message]); | |||
void warn(PackageWarning warning, {String message, Locatable referredFrom}); | |||
} | |||
|
|||
// Something that can be located for warning purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is existing code, but this comment should probably be a doc comment (///
).
lgtm! In a future PR, we may want to translate the path urls ( |
Looks like some sort of VM bug. Collecting data, but sadly the bug seems to appear rather asynchronously with anything particular happening in the code. |
vm bug filed at dart-lang/sdk#29620, holding off on this PR until that's settled. |
I had the bot re-run the build - looks like the crash is consistent (which is surprising to me - I'd assumed it was an intermittent failure). |
Yep. Crash reliably happens. I have a workaround, detailed in this comment, but in order to keep the reproduction case around, leaving this branch as is until they have a chance to fix the problem. |
Going to close this PR and preserve the branch until the vm folks have a chance to fix their bug. The workaround is actually quite reasonable and is probably what dartdoc should be doing anyway, so will reopen this change in a new branch. |
While working on #1418 I needed better warning information to trace down what changed when we upgraded analyzer. This is the result. (Examples are from angular2. @chalin)
Unresolved doc references now properly indicate when the documentation is actually inherited from something else (#1405).
For some cases, the no canonical library found warning will now indicate which element referenced it. (More cases need to be added here, but this is still an improvement.)