-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Analyzer] Analyzer unit tests need updating for null safety release #43777
Comments
If we simply update all of the tests to be valid under Null Safety then we will have very little coverage of legacy code. If that's a concern, then we might need to do something more complex. We haven't really worried about this in the past, but most of the other features that were enabled were additive while this one is breaking. |
Keeping the legacy coverage seems useful. Ideally, there is a solution which doesn't require adding |
Yes, all our |
Move this under the Analyzer Epic |
Is someone working on this? We will be blocked on this in the not too distant future. |
The update for It was relatively easy to do, because we switched analyzer/ to using But |
…d by default in 2.12 Bug: #43777 Change-Id: If7e5f71fe1d8277898a02745f96f1c8003cc8069 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168240 Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Move this back out to Beta2 epic, remove type-enhancement label |
Any updates on this? |
@bwilkerson would you be able to look at this? I am not so familiar with analysis_server, but Konstantin mentions the fix may be to use PubPackageResolutionTest, which I am planning on using in my fix for #43883, the sibling bug for nnbd_migration. |
Based on the comments in https://dart-review.googlesource.com/c/sdk/+/168920, I'm not sure what approach I should be implementing. But once we know what needs to be done I can assess how big the task is and whether I can take it on. |
I was able to fix the nnbd_migration tests with a smaller arc. https://dart-review.googlesource.com/c/sdk/+/168900 The trick is to also write a package config file expressing the languageVersion of each package involved (possibly just one package, the one for the individual test file...). |
https://dart-review.googlesource.com/c/sdk/+/169141 for |
I believe there are 13 tests that turn red in analyzer_plugin. Grep for |
… enabled by default in 2.12 Bug: #43777 Change-Id: Ibd1da16b58b8304d6f1d4260615c7049fc5ffe59 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169141 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
Still seeing some failures here. |
Only one test suite featured tests which needed to be in Null safety, so that was split into two suites. Otherwise, the changes very nearly mirror those in https://dart-review.googlesource.com/c/sdk/+/169141. Bug: #43777 Change-Id: I39219dc0157ac33d4be1d902930060577e659cad Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169244 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
Fixes for integration tests in |
Looks like we're down to these failures: pkg/analysis_server/test/integration/analysis/highlights2_test |
…on for Null Safety turned on. Bug: #43777 Change-Id: Ibc5426dd3035c54306bed6e0dec8a6b379163057 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169286 Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
https://dart-review.googlesource.com/c/sdk/+/169286 landed to fix |
Bug: #43777 Change-Id: I0699915c45369fac5590a6ada4a8ded186612947 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169440 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Looks green now, thanks! |
The analyzer has various unit tests that define and analyze Dart code. Currently, that code is treated as opted out of null safety. When the experiment flag is flipped, that code becomes treated as opted in, and some of it is no longer valid (it also arguable is no longer testing the same thing). This CL flips the experiment flag, and can be used to test this out. For a concrete example, see this log which shows a failure on
pkg/analysis_server/test/analysis/reanalyze_test.dart
(as well as others).cc @scheglov @bwilkerson @devoncarew
The text was updated successfully, but these errors were encountered: