Commit Graph

4182 Commits

Author SHA1 Message Date
pq 8e85c1e7c6 bulk fix for non_constant_identifier_names
Change-Id: I4c6086eadff4de8c53569321bef9f5b3215eafd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-09-03 22:48:55 +00:00
Brian Wilkerson 40c648990b Add parser support for add-type-parameter
Change-Id: I48c9a46e2c233a4ab49842b74b0ae689bc71563c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161762
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-03 20:14:25 +00:00
pq 910d1d7e05 bulk fix for sort_child_properties_last
Change-Id: If340bb29892eded3801801bf5e97794b45eae321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161624
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-03 20:13:05 +00:00
Brian Wilkerson f9e53846be Add more tests of the add-type-parameter change
I added several tests. I also renamed most of the tests to remove a
component that was redundant with the class name after my previous
reorganization of the tests. Unfortunately this will probably make it
fairly difficult to see what changed. No test coverage was lost, so it
might be easier to just look at the new version of the file.

Change-Id: I5a1c9ce6e062f9520631a9ec4a9cfc34141bf2c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161663
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-03 17:23:35 +00:00
Paul Berry a4b2047d9d Reland "Flow analysis changes to fix mixed-mode unsoundness loophole."
This is a reland of d833f2f65c

Original change's description:
> Flow analysis changes to fix mixed-mode unsoundness loophole.
> 
> This is the flow analysis portion of the fix to
> https://github.com/dart-lang/language/issues/1143.  Follow-up changes
> will be needed in the CFE and/or backends to ensure that exceptions
> are thrown under appropriate circumstances.
> 
> This CL also makes some improvements to flow analysis's reachability
> analysis so that it accounts for nullability of the target when
> analyzing the reachability of `??=` and `?.`.  Hopefully these
> improvements should make the fix to
> https://github.com/dart-lang/language/issues/1143 clearer and more
> consistent.
> 
> Change-Id: I5fa5c070f13fd57ac4c2fb87f2d67588861594b0
> Bug: https://github.com/dart-lang/language/issues/1143
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160440
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

Bug: https://github.com/dart-lang/language/issues/1143
Change-Id: If9c45649c1e9f4b19f7c282e7a1c4c956a7bc17f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161622
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-03 01:01:43 +00:00
Brian Wilkerson 1cb49093fe Change the data-driven file parser to support the style of element reference used in the design docs
Change-Id: I042f43670187c21314feb5e348b9c1bcdfde3605
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161632
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-03 00:17:22 +00:00
Mike Fairhurst d313fb70b6 [analysis_server] Tests should import dart:async to use Future
Tests which depend on the import can merely use Completer instead of
Future to get the same result. Tests which do not rely upon the import
have had the import removed.

Change-Id: I74641a58b1f97c8599c8faad86943b1c68508980
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161625
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 21:48:03 +00:00
Danny Tuppeny 31cc6df4fe [Analyzer] Compute code locations for LSP definitions
Change-Id: Id52fefae11b0d779b860cb44e33bc36cc12e55bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161168
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 20:51:27 +00:00
Danny Tuppeny 5112f526cf [Analyzer] Add optional support for codeOffset/codeLength on navigation targets
Change-Id: Ib328c408d590398d30bd341603781f68f2fd1402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161166
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 20:51:27 +00:00
Danny Tuppeny 047c0f860a [Analyzer] Support analyzing open files without open workspaces
This introduces the concept of temporary analysis roots, used to ensure loose files that are opened can be analyzed even when there are no other analysis roots (and therefore no existing analysis drivers).

Fixes https://github.com/Dart-Code/Dart-Code/issues/2764.

Change-Id: I6b208f7c2fe8b538d7254691221fb72604ef156e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161500
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 17:46:02 +00:00
Mike Fairhurst 1134a0f17c [analysis_server] Remove unused dart:async imports
Change-Id: I764ee78cb9e31bdb3abaa36ca4754e1fed180311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161447
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-02 17:29:52 +00:00
Paul Berry ab16d79af9 Revert "Flow analysis changes to fix mixed-mode unsoundness loophole."
This reverts commit d833f2f65c.

Reason for revert: Broke build, e.g. https://ci.chromium.org/p/dart/builders/ci/dart-sdk-mac/12688

Original change's description:
> Flow analysis changes to fix mixed-mode unsoundness loophole.
> 
> This is the flow analysis portion of the fix to
> https://github.com/dart-lang/language/issues/1143.  Follow-up changes
> will be needed in the CFE and/or backends to ensure that exceptions
> are thrown under appropriate circumstances.
> 
> This CL also makes some improvements to flow analysis's reachability
> analysis so that it accounts for nullability of the target when
> analyzing the reachability of `??=` and `?.`.  Hopefully these
> improvements should make the fix to
> https://github.com/dart-lang/language/issues/1143 clearer and more
> consistent.
> 
> Change-Id: I5fa5c070f13fd57ac4c2fb87f2d67588861594b0
> Bug: https://github.com/dart-lang/language/issues/1143
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160440
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

TBR=paulberry@google.com,scheglov@google.com,johnniwinther@google.com

Change-Id: If1215b19975e0958d612dd69767088095d853879
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/language/issues/1143
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161580
Reviewed-by: Paul Berry <paulberry@google.com>
2020-09-02 15:02:46 +00:00
Paul Berry d833f2f65c Flow analysis changes to fix mixed-mode unsoundness loophole.
This is the flow analysis portion of the fix to
https://github.com/dart-lang/language/issues/1143.  Follow-up changes
will be needed in the CFE and/or backends to ensure that exceptions
are thrown under appropriate circumstances.

This CL also makes some improvements to flow analysis's reachability
analysis so that it accounts for nullability of the target when
analyzing the reachability of `??=` and `?.`.  Hopefully these
improvements should make the fix to
https://github.com/dart-lang/language/issues/1143 clearer and more
consistent.

Change-Id: I5fa5c070f13fd57ac4c2fb87f2d67588861594b0
Bug: https://github.com/dart-lang/language/issues/1143
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-09-02 14:27:52 +00:00
pq e6bfae0552 test case for potential overlap in convert_to_null_aware_test
Change-Id: I54a002fc60328eea13e14a57785298f4907e22c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-09-01 23:47:01 +00:00
pq 2b937656bd bulk fix for prefer_null_aware_operators
Change-Id: I12b0f8bded48cf17550b6d7203e7b45576953574
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-09-01 22:12:16 +00:00
Danny Tuppeny fb0729b35d [Analyzer] Fix convert_to_single_quotes fix for interpolated strings
See https://github.com/Dart-Code/Dart-Code/issues/2727

Change-Id: Ibcea426952835c5919b804781d1c01febaf9a6f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161171
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 19:31:59 +00:00
Brian Wilkerson f5fbe015f0 Reorganize the tests for the data-driven changes
The tests have been re-organized and renamed, but there are no
substantive changes.

Change-Id: I0ce3447f56ade2a52a52d89e522275f4c1ea4e2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 18:46:53 +00:00
Danny Tuppeny c34cd2c758 [Analyzer] Use relative paths to libraries in refactor error messages
Change-Id: Iacac96d3bf80a5ee29b45500c439ec7f527e6a39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-09-01 16:10:01 +00:00
pq c6cbf51cc4 bulk fix for prefer_int_literals
Change-Id: I24714e1268734fc947f8df0444d0ba2d94ac39de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-09-01 15:37:19 +00:00
Brian Wilkerson 306dcc41cc Add an end-to-end test of data-driven fixes
Change-Id: Idb932f3e4195e47a84826f42a44571c26bedd76b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161300
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 15:25:49 +00:00
Brian Wilkerson 96d2c2da4a Add more tests for the data-driven rename fix
There is one test marked as failing because we haven't implemented
support for it yet (discussion welcome). Getting the other tests to pass
prompted enabling the fix for several additional error codes.

Also, I'm not convinced the organization of the tests is optimal. It was
fairly easy to see missing test cases for the deprecated API cases, but
I find it much harder when the tests are divided based on the error code
that is produced in the code to be fixed. Discussion of alternatives is
also welcome.

Change-Id: I51af96c72ca86b37aac59c769b42c2c93012ed80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161181
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-31 21:40:29 +00:00
pq e031b554c4 bulk fix for prefer_for_elements_to_map_fromIterable
Change-Id: If733742caf164a523f157ff3c557a21a118b1926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-29 15:33:34 +00:00
Brian Wilkerson e7d483e499 Add data-driven data file parser tests for some invalid input
Change-Id: Ic47d53cce17cf78daa1b73a9d570aa77ab5d483f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160920
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-28 19:26:08 +00:00
Danny Tuppeny 59d7bf2ca4 [Analyzer] Handle highlights for trailing comments that aren't the entire file
Change-Id: I4138250ab2721f3c9ef57a7283c67880f46aae9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-08-28 18:49:58 +00:00
Brian Wilkerson 14a6f4fed3 Add a way to locate data files and convert them to transform sets for data-driven fixes
Change-Id: Id8183fb43263bc19ece595be9ebd2408bf1222a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-28 14:35:28 +00:00
Danny Tuppeny b29aebbc8d [Analyzer] Produce tokens for trailing comments in a file
Change-Id: I65e611f1bbe29a511264df203067bd9628990acd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160580
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-27 15:32:57 +00:00
Danny Tuppeny d5b9dcb00c [Analyzer] Ensure LSP analysis drivers are seeded with existing priority files
Fixes https://github.com/dart-lang/sdk/issues/42994.

Change-Id: If8482040b76645ee44224d5a44174ef74ade8e99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160225
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-26 17:55:25 +00:00
Danny Tuppeny 84c24d8f68 [Analyzer] Fix analysis of analysis_options.yaml in LSP server
Notification managers roots need to get set before context managers otherwise the error is filtered out.

Change-Id: I82c46136fa8b32846817ec950405c7093fec1dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160070
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-08-25 15:03:29 +00:00
Danny Tuppeny b613265c85 [Analyzer] Reanalyze analysis_options when .packages changes
Fixes https://github.com/dart-lang/stagehand/issues/619.

Change-Id: I30022215b23de2b690b5cde95c9dd256a9ef83d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160068
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-25 15:03:29 +00:00
Brian Wilkerson 680f3b51ca Suggest named parameter names in a super constructor invocation
Change-Id: Ibe095cab1473aefd3a1067bb0264a115f44c05d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159964
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 20:42:07 +00:00
Brian Wilkerson ebb9a321c1 Create constructor should not initialize late final fields
Bug: 43161
Change-Id: I2bda5eca3527486b44090f8efff3c77a04ee214b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159962
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-24 20:21:27 +00:00
Konstantin Shcheglov cf4d41074e Fix crash when working with directives with invalid URIs.
R=brianwilkerson@google.com

Change-Id: Id8bd5c49269c58404b4a4d3182b77a37fb494c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-22 18:37:51 +00:00
Brian Wilkerson d0ac759927 Initial parser for the data-driven fixes data file
This is very incomplete, but allows us to read rename changes, which will
enable us to get a steel thread in place.

Change-Id: I3259f64bd6d3dc1fdc4894d2b08b5388e8652dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159642
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-21 19:11:30 +00:00
Konstantin Shcheglov eb51dbc403 Fix prefix start for locations before a token.
Bug: https://buganizer.corp.google.com/issues/161242256
Change-Id: I67a5ee774090f155d53e9c71e7a06d848e1d9c72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159324
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-20 15:51:59 +00:00
Brian Wilkerson 3c5a081c08 Update modify_parameters to handle post-deprected APIs
I also removed the support for updating overrides. I realized, after I'd
started to implement it, that we can't capture enough information in the
text file to be able to update overrides. I have an idea for an
alternative, but would love to hear any thoughts you might have.

Change-Id: I2c55e944384869f853e32238995c659aab49f520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159380
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-19 21:08:27 +00:00
Brian Wilkerson 11ba8cb2dd Drop the suffix "Change" from class names
I don't think it adds value, but if you disagree I'll add it to the
class ModifyParameters for consistency.

Change-Id: Ib823dd482d13a2ae9eb355298d3db813a3791fb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159301
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-19 16:59:16 +00:00
Brian Wilkerson 4af6831020 Add support for modifying parameters in a data-driven fix
Change-Id: I756df3e665c24cbf5131a0aae1c1526c08a5d172
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-18 14:56:40 +00:00
pq 6e62a0435d bulk fix for unnecessary_brace_in_string_interps
Change-Id: I47e846994d727d84564ba8f7daf7a8e6334417c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158143
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-17 18:32:59 +00:00
pq 4049442385 bulk fix for prefer_iterable_whereType
Change-Id: I490bb4cc6e03adb606b45a5aae9dbbc763747124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-13 00:40:18 +00:00
pq 0673922e22 bulk fix for use_rethrow_when_possible
Change-Id: I67b4022109c5b4dccaf3d716f9b4328bf5cdc758
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-12 21:19:08 +00:00
Brian Wilkerson f532f023ff Remove the convert_argument_to_type_argument change
This functionality will be supported by a combination of
add_type_parameter and remove_parameter.

Change-Id: Ie9970cd87963519f3c7c6fd55f46cd0e89fafc9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158344
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-12 19:53:08 +00:00
pq ab7c1e5904 bulk fix for prefer_generic_function_type_aliases
Change-Id: Iebe4c3a11a37a0dedb0dbaef5c001e848ae29a3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-12 19:27:48 +00:00
Brian Wilkerson d6a901e64d Add an add_type_parameter change to the data driven fix support
The intention is for this and another change that allows function
parameters to be removed to replace the change_argument_to_type_argument
change.

Change-Id: I521c20262d5a78d3156c2b53babcf5d610028c67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158205
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-12 18:32:16 +00:00
pq e3d30b8331 bulk fix for prefer_if_null_operators
Change-Id: I392debf03af58d3f597b5f377eaf65d400a5db35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158164
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-12 16:45:20 +00:00
Konstantin Shcheglov c4f3bfb5cb Rename PackagesContent to MockPackages.
We have MockPackages in DAS, although implementation is quite
different. At some point we might want to unify them. But for now
just name it similarly.

R=brianwilkerson@google.com

Change-Id: Id4bb2b16b845368d99260200f1172562362a8beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158148
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 20:33:59 +00:00
Konstantin Shcheglov d68227dfe0 Remove PackageMixin.
R=brianwilkerson@google.com

Change-Id: I801d64f919e8e8fded0e08ebc6e9ac2b8ece4b32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 17:20:39 +00:00
pq b989ccf733 bulk fix for unawaited_futures
Change-Id: I0d53fe9d31b22a08585ea625a5dfbbf5ed5187e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-11 15:23:49 +00:00
Jonas Hungershausen 94be2fc1f8 [Analyzer] Keep comments when organizing imports
This change adjusts the organize imports logic, to keep any comments
written in the line above an import statement attached when
organizing the imports, while being smart about what comments to keep.

Closes https://github.com/dart-lang/sdk/issues/42515
Change-Id: Ibcca4f24411ac16bcdb17f66fb6d2b9c45f7d367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157743
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-11 15:03:59 +00:00
Devon Carew 57b192a0fc [analyzer] remove the completion language model file
Bug: https://github.com/dart-lang/sdk/issues/42988
Change-Id: I3988f08eb9a7480aacb4a7be79f537595807a3c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158067
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-11 14:46:59 +00:00
Paul Berry d4e4abdef6 External field support: add a notion of external fields to the AST and element model.
In follow-up CLs I will update error reporting logic.

Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-10 21:54:54 +00:00