-
Notifications
You must be signed in to change notification settings - Fork 58
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
FED-756 Allow analyzer 2.x, fix analyzer plugin in newer SDKs #807
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
Errors look like: Invalid @GenerateMocks annotation: Mockito cannot generate a valid mock class which implements 'List' for the following reasons: The method 'Iterable.reduce' features a non-nullable unknown return type, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
channel.sendNotification(plugin.AnalysisErrorsParams(analysisResult.path!, []).toNotification()); | ||
return []; | ||
} | ||
|
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 assume this was removed because analysisResult.unit is non-nullable?
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.
Yup, exactly.
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.
While I may not be overly familiar with analyzers, these changes make sense; many of them are null-safe changes. I've got a couple of easy questions and a nit.
QA+1 CI Passes with updated tests |
@Workiva/release-management-p |
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.
+1 from RM
Motivation
We want to pull in newer analyzer versions, and unlocking analyzer 2.x is the next step.
Also, while testing I noticed that the analyzer plugin doesn't correctly start in IDEs in Dart 2.18☹️ . Since this PR touches analyzer_plugin, I figured I'd fix that so we can manually verify changes.
Changes
Supporting both isn't necessary since the plugin is its own separate dependency graph, and supporting one is almost definitely easier. I went ahead and picked 2.x as the one to resolve to, since we'd have to upgrade anyways whenever the main package drops support for 1.x.
ErrorCode
objects instead of Strings, and we couldn't construct ErrorCodes without more src importsThese all import non-null-safe code from over_react's boilerplate parsing, which apparently prevents the plugin from being able to run in 2.18 SDK, and our previous workaround of a language comment in the plugin's
main
no longer works. Until we're able to migrate that code to null safety (which will hopefully be soonish), we'll need to stop importing these to get the plugin working again.Release Notes
Widen analyzer range to allow 2.x in addition to 1.x
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: