-
Notifications
You must be signed in to change notification settings - Fork 58
Fix analyzer plugin build in Dart stable #696
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
…fully fix tests incorrectly opting into null safety
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
| run: | | ||
| dart tool/travis_link_plugin_deps.dart | ||
| cd ./tools/analyzer_plugin | ||
| ./tool/travis.sh |
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 broke this up so that we could more easily conditionally run formatting step
| cd ./tools/analyzer_plugin | ||
| ./tool/travis.sh | ||
| - name: Validate dependencies | ||
| run: pub run dependency_validator --no-fatal-pins -i analyzer,build_runner,build_web_compilers,built_value_generator |
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.
fyi if you want to upgrade to dependency_validator v2 or v3, then it should detect the executable from build_runner and the builders from the last two, and then you'd only need to ignore analyzer which you could do statically. You'd also have to drop --no-fatal-pins and ignore whichever packages are ignored.
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.
(probably out-of-scope since this is a small PR, just thought I'd throw it out there for future reference)
| @@ -0,0 +1,584 @@ | |||
| // From analyzer 0.39.17 src/dart/ast/utilities.dart | |||
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.
Were these utils removed from public entrypoints?
| // This is necessary for `ConstantEvaluator`. If that API is removed, it can just | ||
| // be copied and pasted into this analyzer package (if still needed). | ||
| // ignore: deprecated_member_use | ||
| import 'package:analyzer/analyzer.dart' show ConstantEvaluator; |
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.
Oh, looks like this answers my previous question. Did they replace this with an alternative or a better option?
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.
Nope
a8b7b06 to
1861f36
Compare
aaronlademann-wf
left a comment
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
|
@Workiva/release-management-pp |
rmconsole-wf
left a comment
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
The build for the analyzer plugin was failing in Dart 2.13 with errors that seemed like null safety was being incorrectly opted into.
Example: https://github.com/Workiva/over_react/runs/3306575416
I forget exactly why, but increasing analyzer_plugin (and thus increasing the resolvable upper bound of
analyzer) seem to fix the issue.Changes
analyzer)getDisplayString'swithNullabilityarg required)srcdirectories that were removed/moved in newer analyzer versionsNote this gets CI passing, but for some reason, diagnostics aren't showing up in the Dart Analysis panel of IDEs 😕 . Other things like suggested edits (e.g., "Add ref") work as expected. The
AnalysisErrorsParamsnotification being sent by the plugin seems to be getting constructed properly with the correct errors and gets sent, but for some reason the analysis server isn't piping it through... Update: upgrading to analyzer_plugin ^0.6.0 (and analyzer ^1.7.0) fixes the issue! We'll do that in a separate PR, since upgrading those dependencies in over_react and over_react_analyzer_plugin is going to take some effort.Release Notes
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: