Commit Graph

6105 Commits

Author SHA1 Message Date
Konstantin Shcheglov a2c3ecabce Remove DartSdk.useSummary.
R=brianwilkerson@google.com

Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-30 19:07:32 +00:00
Konstantin Shcheglov 89782c96d9 Implement changes to return type verification.
https://github.com/dart-lang/sdk/issues/41803
https://dart-review.googlesource.com/c/sdk/+/149163
https://github.com/dart-lang/language/pull/989

Change-Id: I13caf53a3e96c7b266dd3b3bf511002addcf83b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149373
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-29 23:09:37 +00:00
Brian Wilkerson 352f22b06f Convert two more fixes to producers
Change-Id: I4007e7a4931c02cc528a596c85a0da5c6e854c58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-29 17:59:34 +00:00
Danny Tuppeny 65671edd30 Support publishing errors (diagnostics) for plugins in LSP
This splits Notification manager into an abstract base (which handles merging plugins notifications) and two concrete subclasses that can broadcast the notifications in the correct format for LSP vs DAS protocols.

Change-Id: I5fa2b643adc7bb46db0f06ddd2c997d8a736cbaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149162
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-29 17:39:06 +00:00
Konstantin Shcheglov 6a551f8d54 Use allowed_experiments.json when building SDK summary (reland).
Landed: https://dart-review.googlesource.com/c/sdk/+/149052
Reverted: https://dart-review.googlesource.com/c/sdk/+/149201
Change-Id: Ief9430c58254fe8cbdcedc8d3678c61d4c086f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-29 16:31:35 +00:00
Jaime Wren 609c0d35eb Refactoring in some *_contributor_test.dart files, more assert*() method declarations to superclass to share instead of having multiple copies
Change-Id: I43b539c78b5b3880b747c75add1f82ca78510893
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149365
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2020-05-29 15:26:25 +00:00
Jaime Wren 77d2a59d8e Add declaredConstructor() to the LocalDeclarationVisitor and mark all declared*() members as concrete with empty bodies. Subclasses are updated in this change as well.
Change-Id: I458968049781830af83d09512a6a1dd75b573070
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149391
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-05-29 15:23:46 +00:00
Devon Carew ede9349499 [analysis_server] always send an analytics client ID
Change-Id: I414f5641bcad418b6bfdc1b75d10d3250aeefb84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149389
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-05-29 01:19:33 +00:00
Konstantin Shcheglov a56368926e Remove support for 'packageRoots' in DAS.
Bug: https://github.com/dart-lang/sdk/issues/41197
Change-Id: I61929a5853b4e353e3a758fe5088f2ff2c1fda2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-28 22:57:32 +00:00
Mike Fairhurst 285767744e [analysis_server] No longer report server crashes to staging.
Change-Id: Ic02744c1db5ad6f1daafef7ea8e78559bd20a87a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149383
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-28 22:44:22 +00:00
Brian Wilkerson b7364da5fd Fix the computation of completion location in OpType
There was a bug earlier in which we were attempting to use a relevance
table (MethodInvocation_arguments) that was not generated. I thought
the bug was that the table wasn't being generated, so I attempted to
generate the table (in relevance_table_generator). But the table can't
be generated and the real bug was that the wrong contextLocation was
being generated when computing the OpType. So I backed out the earlier
change and updated the generation to generate the right location.

Change-Id: Ifbd2c6c3e11e1e98887108be7eb6d90e90452446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149381
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-28 21:23:01 +00:00
Brian Wilkerson 1892a00fe5 Fix the RemoveType quick fix to work with final and const (issue 42099)
Change-Id: I4e933682a821bbe943aacc936a471ed72f9b1d89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149361
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-28 20:49:27 +00:00
Brian Wilkerson 8dcd9385c5 Compute mmrs at a finer granularity
Change-Id: I6f6e3d415591cb52fd5ae409a85d5481aff26849
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149360
Reviewed-by: Jaime Wren <jwren@google.com>
2020-05-28 18:24:42 +00:00
Danny Tuppeny 039581df15 Ensure plugin file types are registered for all LSP capabilities
Change-Id: Ic691aa83ae37700502a6d6de26a1b8a92b071287
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149289
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-28 17:10:48 +00:00
Brian Wilkerson b3cec0e400 Incorporate old relevance ideas into context support for new relevance
This doesn't improve the scores in the small app I've been using, but
it does move forward all of the old relevance computation support that
I could find into the new relevance computations.

The other thing done in the old relevance support is some filtering.
For example, in an extends clause, mixins will be filtered out. This
would improve the relevance scores (by reducing the number of
suggestions) but it doesn't seem like it ought to be done as part of
the relevance computation. We should think about a good way to better
filter the suggestions.

Change-Id: Icc671ff033cc5a2d2356c61555844b944d8890b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149204
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-27 21:19:57 +00:00
Konstantin Shcheglov 00fa48fbb1 MockSdk does need to create summary.
Change-Id: Id62bc99394e9afd6306ba6a12118d7bcd045a598
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 19:39:10 +00:00
Brian Wilkerson cbc6de6c2d Update the relevance metrics tool
This adds tracking of how often type parameters are declared and how
often import prefixes are used.

It also removes the code to convert to and from JSON because we don't
need it.

Change-Id: I7f3b19e9f82bd8aa1b327797726839ff63837795
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-27 16:44:50 +00:00
Konstantin Shcheglov b6af46dc30 Revert "Use allowed_experiments.json when building SDK summary."
This reverts commit 97d9412996.

Reason for revert: This causes some, probably temporary, issues internally. Reverting for a day or two.

Original change's description:
> Use allowed_experiments.json when building SDK summary.
> 
> Change-Id: I3fd73d9890d62cc7b3c19e061069979a6b65c9b7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149052
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: I9c8142bfc5728dd773830b653bb31d28b5e81628
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149201
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 16:26:12 +00:00
Konstantin Shcheglov 97d9412996 Use allowed_experiments.json when building SDK summary.
Change-Id: I3fd73d9890d62cc7b3c19e061069979a6b65c9b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149052
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 15:28:19 +00:00
Konstantin Shcheglov 14f64f9db4 Add CrashReportingAttachmentsBuilder.forException()
R=brianwilkerson@google.com

Change-Id: I66793d61e02d25931d230e8b9e3541255ac6324a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149054
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 15:28:11 +00:00
Konstantin Shcheglov 279024d823 Deprecate InstanceCreationExpression.staticElement
Change-Id: I3c2de8ce22944963418d543b887720db15badd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148981
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 22:56:42 +00:00
Konstantin Shcheglov fc1a782168 Remove support for '--package-root'.
Bug: https://github.com/dart-lang/sdk/issues/41197
Change-Id: Ia10946b4db2204cc11e78a1d114578ba79904e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-26 21:33:32 +00:00
Konstantin Shcheglov 571f564eda Rewrite TypeName to ConstructorName in one place, consolidate error reporting.
Change-Id: I5ea1369d65c5eb47e920f68806d28f34931d372e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-26 21:32:22 +00:00
Parker Lougheed 47ee7cc316 Remove outdated TODOs related to undesired Element APIs
Change-Id: I7c9bc45ee0e3efd5897da20e8d9555f5c2a1e91a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148984
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 19:02:25 +00:00
Parker Lougheed 172a5d5dc2 Avoid possible exception when removing folder from context
If the folder didn't have a corresponding driver, cannot dispose of it.

Fixes #40336

Bug: https://github.com/dart-lang/sdk/issues/40336
Change-Id: Ia44ec34fcefcee5f66483c3bc97ce33ab8d9300a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148985
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 17:46:28 +00:00
Brian Wilkerson 3329b312c5 Convert another set of quick fixes to the producer model
Change-Id: Ib77901994a186484ec9cbd3496bfa173367304d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148982
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 04:28:09 +00:00
Konstantin Shcheglov 80e9667f2c Fix unused imports.
R=brianwilkerson@google.com

Change-Id: I02f47632bef3a2e601f7f471c7149829e06844f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-25 16:58:38 +00:00
Brian Wilkerson dc37860209 Change the element kind used for relevance computations
We used to be somewhat inconsistent about the choice of element kind for
top-level variables, getters and setters and fields, getters and setters
in classes, mixins and extensions. We no longer use GETTER and SETTER as
kinds, using FIELD and TOP_LEVEL_VARIABLE everywhere. This makes some
cases better and some worse, but improves the overall score across all
the completions in our metrics.

Change-Id: Idd0b10b3afe6023ecf39930b6a09abf28b3232bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148883
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-24 19:21:18 +00:00
Konstantin Shcheglov ed84e0b25d Catch InconsistentAnalysisException while computing assists / fixes.
R=brianwilkerson@google.com

Change-Id: I641b507d6ee3b82fcf02167c2f863ad0b57febff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-24 18:01:10 +00:00
Brian Wilkerson 350dd576b1 Add a fix for avoid_unused_constructor_parameters
Change-Id: I6e7e8c8b93a2e37655689a1bf0193061acc00d67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148951
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-24 16:46:52 +00:00
Brian Wilkerson 9e3b028919 Convert several quick fixes to use CorrectionProducer
Change-Id: I125c21f56277904885399b3b7316eec92c77c8bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-24 16:00:48 +00:00
Brian Wilkerson 3fb5f27d05 Extract and enhance the CREATE_CLASS fix
The enhancement is that we can now create a const constructor if the
class to be created is being used as an annotation. We could also do
this if the class were being created from a constructor invocation, but
I didn't do that. This also doesn't handle creating a named constructor,
but I don't think it's any worse than before. If you disagree let me
know.

Change-Id: Idcff7bd0ac8def416b141b49b801f6798548405d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148885
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-22 18:50:06 +00:00
Brian Wilkerson da7b227803 Convert the AssistProcessor to be data driven when using CorrectionProducers
This removes the need to keep the list of lints associated with a given
correction in two places, removing the possibility of those two places
being out of sync. It also fixes one inconsistency that was pre-existing.

Change-Id: Ic5ccbdeaa3eb07b013375cd0e1676fd6f89f57ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-21 18:26:33 +00:00
Konstantin Shcheglov d307e6df88 Fix RemoveTypeAnnotation when used as an assist.
Change-Id: Ic989ca18634783cf59400423bddb331e88a73400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148793
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-21 16:40:00 +00:00
Brian Wilkerson 6b8387b2de Convert the last fix associated with lints to be a CorrectionProducer
Change-Id: Ieb117e07b74933390c02c3dd400976e37f24d616
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148791
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 23:53:40 +00:00
Parker Lougheed bf7e9d13d7 Allow analyzer to fallback to getter documentation for setters
The analyzer server firsts looks for the setter's dartdoc, then the first parent setter's dartdoc, then the closest getter's dartdoc.

Fixes #38963

Bug: https://github.com/dart-lang/sdk/issues/38963
Change-Id: I09f7ae0e5aa49d2536ebefd44dcfd3d6101bb0a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148566
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 23:00:20 +00:00
Nate Bosch f0450f3efc Remove a usage of the quiver package
The quiver package has very little usage in the SDK. Drop the only usage
outside of the nnbd migration tool to clear a path towards removing the
dependency from the SDK entirely.

Change-Id: I54b14d6e887fe6e6b067793e7ee9480793893c27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148788
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 22:53:19 +00:00
Parker Lougheed 492875cf35 Fix code completion after typedef reference
Has to make some changes to testing and elsewhere due to the call()
function lacking some information.

Fixes #38687

Bug: https://github.com/dart-lang/sdk/issues/38687
Change-Id: Ib00b3a9a15efa393f97130448091b42d5d569924
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 21:33:14 +00:00
Konstantin Shcheglov 10e14c0377 Add context information to exceptions during computing fixes.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Idfd6aaa1f593cef496ebf0763ff038c1ddae6d80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 20:44:11 +00:00
Brian Wilkerson 1b3aa91c4c Add an is_constant feature to completion relevance
This feature boosts the relevance of suggestions for constant elements
when completion is requested in a constant context.

It didn't have as big an impact as I was hoping for in the small sample
app I'm currently using, but it did have a positive impact, so I think
it's worth adding.

Change-Id: I11eb18be798fc15caf8a33f222a20707aeaee2b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148782
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-20 19:28:01 +00:00
Konstantin Shcheglov 1821f0ec32 Issue 41997. Fix for indexing, searching, renaming members of unnamed extensions.
Bug: https://github.com/dart-lang/sdk/issues/41997
Change-Id: I963a9ceae03a0d1ed3d04936c4042980a08fa56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 18:12:30 +00:00
Brian Wilkerson 3a764b7ae4 Stop suggesting private static members in libraries where they are not visible
I suspect that I broke this recently with my refactoring work.
Unfortunately there were no tests to tell me that I'd done so.

An alternative would be to move the visibility checks into the
SuggestionBuilder. I'd been kind of trying to keep that class focused on
_how_ to build suggestions rather than _whether_ to build suggestions,
but there might be value in having the logic for _whether_ to build them
also be centralized. If so, it could either be in SuggestionBuilder or in
a separate (wrapper) class. Thoughts welcomed.

Change-Id: I71198583496a685dd7865ef7955ef2dabaa3e1f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148680
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-19 22:44:10 +00:00
Brian Wilkerson 68d8690580 Attempt to shorten the output from completion_metrics
The doc comments from flutter are sometimes very long.

Change-Id: Ie20d75101fd2bef9b35a3fbeb5277a282f9215c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148662
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-19 21:56:41 +00:00
Brian Wilkerson 94022c4d76 More improvements to computing context type
Change-Id: Iefd3802a87d4de8f84d6f5fcf8d380047773a746
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148513
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-19 19:52:48 +00:00
Paul Berry de5b23d63d Migration: remove abstract interfaces defined by analysis_server for use by nnbd_migration.
These interfaces acted as a temporary bridge to allow analysis server
core classes to provide services needed by nnbd_migration without
forcing analysis_server to depend on nnbd_migration; that in turn
allowed the analysis server to provide migration services to dartfix.
Now that we no longer use the analysis server nor dartfix for
migration, these interface classes are no longer needed.

As of this commit, the nnbd_migration package no longer depends on
analysis_server.

Change-Id: Ia923d91dd59c9a612000da8b0c9ead8a68686d89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-19 18:09:54 +00:00
Brian Wilkerson 5982d8ef2e Convert more fixes to use producers
Change-Id: If2ebc8a836858ea71dd28a91198cc42dc7a9a5c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148562
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-19 14:37:40 +00:00
Brian Wilkerson 4cdb0d1b45 Convert more quick fixes to producers
Change-Id: Ic93f64cffaa645f3746262eb9f9f53b65361dc0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148460
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 18:37:48 +00:00
Brian Wilkerson 07da1b3542 Make a constant private as per review comment
Change-Id: I792f45016eb8f5c7861e36e77c09978f169a0321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-18 17:23:28 +00:00
Brian Wilkerson 0b9db1c47c Convert a few more fixes to be correction producers
This includes passing the highlight length to the producers and fixing a
couple of existing producers that were impacted by that change.

Change-Id: I1344e372b43ff4b1fb597554737d10fd99f95777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148190
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 17:23:18 +00:00
Brian Wilkerson 86edfbef87 Convert ChangeArgumentName to a producer
The ChangeArgumentName "fix" is one of a small number that can produce
multiple fixes. I'm proposing that we support these by adding objects
that can dynamically produce zero or more CorrectionProducers depending
on the situation being flagged as an error.

Change-Id: I37c06ffefd46f4b8478d127d1b537b3bc840e024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148360
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-17 20:20:17 +00:00