Commit Graph

2889 Commits

Author SHA1 Message Date
Konstantin Shcheglov d6189709b8 Issue 33506. Rewrite MethodInvocation into InstanceCreationExpression.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I712ab3c79cfe29b2c201b0affc10b33fc0f60d15
Bug: https://github.com/dart-lang/sdk/issues/33506
Reviewed-on: https://dart-review.googlesource.com/68004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-02 15:33:11 +00:00
Brian Wilkerson ea0468dff4 Fork more server tests to run under CFE
Change-Id: I7addca0b708e0b0dbb28e60619ea0bc2c20711af
Reviewed-on: https://dart-review.googlesource.com/68001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-02 12:39:46 +00:00
Brian Wilkerson 6a6e7abfc6 Clean up some warnings in the server code base
Change-Id: I762fcc704fe0fa0547bbbc347eb248853d358121
Reviewed-on: https://dart-review.googlesource.com/67842
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-01 21:09:45 +00:00
Brian Wilkerson f169ebf418 Fork several server tests to run under CFE
Change-Id: I9ca4184dc5458304f3f1597681fc1c936972d8bd
Reviewed-on: https://dart-review.googlesource.com/67880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-01 20:18:40 +00:00
Brian Wilkerson 373ed6b47f Create a LineInfo when resynthesizing a CompilationUnitElement
Change-Id: I42c075eefacab22d519a646395ec0cdb7322a87b
Reviewed-on: https://dart-review.googlesource.com/67702
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-01 18:35:37 +00:00
Brian Wilkerson 32851e157f Add support for running some non-integration tests in server using the CFE
Change-Id: Iea39976185b70c286ab300b0ee4eee613aa2a52a
Reviewed-on: https://dart-review.googlesource.com/67840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-01 16:03:55 +00:00
Brian Wilkerson 66500de4dc More fixes to the CFE integration tests
Change-Id: Id6a54890d8d41ed220869eb1fb03c951cb9e1446
Reviewed-on: https://dart-review.googlesource.com/67500
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-31 19:14:17 +00:00
Danny Tuppeny 3dc201e168 Update ChangeBuilder to not include empty edits (Take 2)
Combination of Brian's change:
https://dart-review.googlesource.com/c/sdk/+/63901

and Devon's change:
https://dart-review.googlesource.com/c/sdk/+/66405

Change-Id: I57e5d1f7d3a653f225aba2d690190fe1ff18a5b1
Reviewed-on: https://dart-review.googlesource.com/67344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-07-31 13:44:06 +00:00
Danny Tuppeny fe8052428b Remove CONTENT_MODIFIED from spec/test for getSignature
Change-Id: I5d071df8dd02052cff1ba9b414cec62ab34f6bf6
Reviewed-on: https://dart-review.googlesource.com/67342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-07-30 15:00:38 +00:00
Devon Carew 6e322f794c No longer run pub list-package-dirs from the analysis server.
Change-Id: Id02bdfc25cb8827873ff607f7c4d4a3401c9a199
Reviewed-on: https://dart-review.googlesource.com/67205
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-27 23:05:41 +00:00
Brian Wilkerson 66828182f1 Update server integration tests
Change-Id: I8cc3e4b1d8bf963a39e086ea29be6c234715da63
Reviewed-on: https://dart-review.googlesource.com/67204
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-27 21:10:19 +00:00
Danny Tuppeny b2d0f8ea63 Remove tests relating to selected parameter index + bump version number
Change-Id: I2417b202b6b11b4c714f4c1d92edb13fd8d0ccc3
Reviewed-on: https://dart-review.googlesource.com/66572
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-07-26 13:51:19 +00:00
Danny Tuppeny d792809d6f Add signature param defaultValue and remove (unused) selectedParameterIndex
Bug: https://github.com/dart-lang/sdk/issues/27034
Change-Id: I3409ab544b79a7f64d6d41e5d091ca20418f248a
Reviewed-on: https://dart-review.googlesource.com/66562
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-25 15:42:44 +00:00
Danny Tuppeny e5a58158e3 Add constructor impl/tests + additional function tests for getSignature
Bug: https://github.com/dart-lang/sdk/issues/27034
Change-Id: Ie47f76d4197dbcdec0fcfdada7914fdf986731ec
Reviewed-on: https://dart-review.googlesource.com/66540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-07-25 14:57:15 +00:00
Brian Wilkerson be7717dab4 Deprecate more propagated info members
Change-Id: I65555bad9f1087602b7bdb5ae41a3920c23d143d
Reviewed-on: https://dart-review.googlesource.com/66500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-25 13:17:23 +00:00
Danny Tuppeny ebb033cb72 Add signature information to spec and add basic implementation for functions
Bug: https://github.com/dart-lang/sdk/issues/27034
Change-Id: I8d3f1a9c9a824b4b80f9cfa0370a439fa897b226
Reviewed-on: https://dart-review.googlesource.com/64689
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-25 07:16:52 +00:00
danrubel c738ae06b5 Revise recovery of ".as" and ".is" in fasta parser
Change-Id: Id7524d61682ac8ceac419e388ae02bb23cc63e63
Reviewed-on: https://dart-review.googlesource.com/66420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-07-24 18:52:08 +00:00
Brian Wilkerson 54e241d71f Deprecate more AST API and replace uses of it
Change-Id: I6ecf17853915e4b61ee39f25d99451b78d2ba4ac
Reviewed-on: https://dart-review.googlesource.com/66401
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-24 15:51:18 +00:00
Devon Carew 87e21a130d Update pkg.status file entry to unbreak the pkg bots.
Change-Id: Ia7553c662749ed1a7eee46e2d78be6305b53b17d
Reviewed-on: https://dart-review.googlesource.com/65640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-19 00:27:29 +00:00
danrubel a133e78ead Mark last 2 statement completion tests as failing for now
... so that the many other tests will be correctly asserted as passing by the bots.

Change-Id: I382f49b6578574ea2e1ea1adf52aa67241b9ae09
Reviewed-on: https://dart-review.googlesource.com/65460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-07-18 14:10:10 +00:00
danrubel 22998a18fc Statement completion fixes
This fixes all but 2 of the statement completion tests
when the fasta parser is enabled.

Change-Id: I056cb386f46ce489e5ee70f01d9903fa4eb03bf6
Reviewed-on: https://dart-review.googlesource.com/65361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-07-17 22:10:01 +00:00
Brian Wilkerson ab1c1582b1 Remove deprecation hints in analyzer packages
Change-Id: I001e57239a87f2806be74052a5e7686245fea812
Reviewed-on: https://dart-review.googlesource.com/65000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2018-07-17 15:22:07 +00:00
Devon Carew f08ada2d52 Disable a flakey analysis server test.
Change-Id: I9af9145305e29a37c82afc0b2199fba7866a0e0d
Reviewed-on: https://dart-review.googlesource.com/65281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-17 14:54:07 +00:00
Devon Carew 76d1a9b7d1 Fix a runtime types issue in the plugin channel with reported error messages.
Bug: https://github.com/dart-lang/sdk/issues/33808
Change-Id: Ibe79fff9f9c4aecd36c24354f82740e4d00f5f01
Reviewed-on: https://dart-review.googlesource.com/64620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-11 19:12:35 +00:00
Devon Carew 6f648307b9 Address two flaky tests.
Change-Id: Ia32cd45d03e45d8a5bbc76cc37343f3e23c3a138
Reviewed-on: https://dart-review.googlesource.com/64581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-11 16:39:43 +00:00
Devon Carew 2dd33c2a6c Have the package:analyzer strong mode option hard coded to on. Delete several spec mode only tests.
Change-Id: I5dffec68d9845fe75936d55100c03306b6eda363
Reviewed-on: https://dart-review.googlesource.com/64060
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-10 05:30:10 +00:00
Devon Carew 3cc0a9a230 Another fix for a race in a test.
Change-Id: I548dff1e4abb45b7d8516923db92dc9d315d72d2
Reviewed-on: https://dart-review.googlesource.com/64220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-09 21:29:45 +00:00
Devon Carew 2519892295 Address a race condition in a test.
Change-Id: I86c06ee42ece8b24d37c1b4bb47861614756de82
Reviewed-on: https://dart-review.googlesource.com/64083
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-07-09 16:53:16 +00:00
Brian Wilkerson ed0ccc7ac9 Add more error message mappings
Change-Id: I5511ba2404ca3a430c6fda35b5e79a14eceb1188
Reviewed-on: https://dart-review.googlesource.com/63961
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-09 16:38:08 +00:00
Danny Tuppeny 65ee9519d1 Force tests to fail pending implementation.
Some of the expected failures passed on Windows - I think it's because they're not creating the "empty edits" on Windows (probably because something else is going wrong with finding which files need updating).

So for now, this forces them to fail (so they "pass"). I'll do some testing on Windows when working on these next week to figure out what's wrong.

Change-Id: I55cbf42f233e7f19b95733cfbd136b0ff1803607
Reviewed-on: https://dart-review.googlesource.com/63882
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-07-05 19:27:51 +00:00
Danny Tuppeny 609a191115 Basic implementation of MOVE_FILE for files
Simple file tests are passing (directories, packages still outstanding).

Bug: https://github.com/dart-lang/sdk/issues/33605
Change-Id: Id9793698050c1a98ad56f511bb515d59d6c769ca
Reviewed-on: https://dart-review.googlesource.com/63740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-07-05 16:50:25 +00:00
Danny Tuppeny 148013f9f7 Re-add tests for MOVE_FILE refactoring.
- Revert commit 90121b528a
- Remove old implementation of MOVE_FILE and return an empty change
- Fix compile errors
- Mark all tests with @failingTest

Bug: https://github.com/dart-lang/sdk/issues/33605
Change-Id: Idb3b31e2bec1788d0e4148dd99213d57b6b2e38a
Reviewed-on: https://dart-review.googlesource.com/63584
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-04 07:17:57 +00:00
Konstantin Shcheglov f385664e4b Store unresolved assignments as UnresolvedVariableAssignmentJudgment.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I4738ba450b1f7e7cab794bdc34a88996d1d827b3
Reviewed-on: https://dart-review.googlesource.com/63360
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-02 17:14:28 +00:00
Devon Carew 710530c640 Update deprecated uses of package:test's isInstanceOf.
Change-Id: I0789ad89f2a247a17c472d74ca16885c5b8b6d5c
Reviewed-on: https://dart-review.googlesource.com/63320
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-30 00:08:44 +00:00
Devon Carew a88ece53b5 Increase the timeout for plugin/plugin_manager_test.dart.
Change-Id: Ie9bff5ed8a006f0ea22c85b979bfb2782a0f261a
Reviewed-on: https://dart-review.googlesource.com/62965
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-29 00:54:47 +00:00
Devon Carew c19233dcce Plumb in more of the analytics impl into the analysis server; allow clients to enble analytics.
Change-Id: Id546ce60e3ec49d37d6c5545f98a46bff009e6c1
Reviewed-on: https://dart-review.googlesource.com/62701
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-06-28 16:28:25 +00:00
Devon Carew 17b53a2835 Test out no_implicit_casts on the analyzer source base.
Change-Id: I4eb2414d7d9bbe21883c9e5e8eca10f2eaafb465
Reviewed-on: https://dart-review.googlesource.com/62725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-28 02:20:43 +00:00
Konstantin Shcheglov a1efbd326f Change FrontEndCompiler.getOutline() to return full kernels.
So, we still get annotations, default values, and initializers.

See also https://github.com/dart-lang/sdk/issues/33633 that
tracks the fact that we now perform body resolution twice.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Idbe628411512c24f73ff3ac4773c895a75cd0b28
Reviewed-on: https://dart-review.googlesource.com/62400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-26 19:56:40 +00:00
Devon Carew f381778867 Update the status of analysis server tests.
Change-Id: I12c2366209ae712e064888714dd65ce8ec9d89f7
Reviewed-on: https://dart-review.googlesource.com/62003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-23 18:42:31 +00:00
Devon Carew e132240c91 Re-enable some failing analyzer_cli --use-cfe tests.
Change-Id: I1085c0dd5d8e4fa818bf82b258a3639a1d196266
Reviewed-on: https://dart-review.googlesource.com/61903
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-06-23 01:17:05 +00:00
Devon Carew 02721709c3 Fix a committed solo test and mark it as passing now.
Change-Id: Id0185d229ef84ac78bba1906ce90ad0083c9651d
Reviewed-on: https://dart-review.googlesource.com/61905
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-22 16:17:55 +00:00
Konstantin Shcheglov 4ebdb31646 Separate getOutline() and getResolution() in FrontEndCompiler.
This will allow us later switch from applying resolution to parsed
AST to directly generating resolved AST, when we get to this.

New failing tests are because of absence of annotations, constant
values (initializers, default values), and constructor initializers
in outlines.

We also don't get errors for constant value computing, hence some
tests are now passing, but not by the reason we intended to test.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I5b45da592563af02c45e8cda160ccd24487c3591
Reviewed-on: https://dart-review.googlesource.com/61743
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-06-22 04:04:33 +00:00
Paul Berry 06a588233c Fix package_root_test.dart on mac buildbot.
I broke this in 591cf85c76, but failed
to notice because the test is disabled on Linux (see
https://github.com/dart-lang/sdk/issues/33382)

Change-Id: Ida2bc1ec03db83bdb9c5cbd58cf4534d95fe7781
Reviewed-on: https://dart-review.googlesource.com/61307
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-20 20:54:47 +00:00
Paul Berry 591cf85c76 Re-enable the old analyzer/FE integration logic.
This gets the tests running again.  I'll follow this up with CLs that
reshape the ResolutionStorer API to match the Factory API we're
building, and then after that we can transition the code over to
calling the Factory API directly.

Fixes #33504
Fixes #32258

Change-Id: I105841ed5b2ed1198ec5e3e7387f694c61d36ca7
Reviewed-on: https://dart-review.googlesource.com/61101
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-06-20 14:35:31 +00:00
Devon Carew f8caffd9e6 Remove some uses of Platform.packageRoot.
Change-Id: Ic01e7f7a9f5c677bcf3779ae2a9386345620793a
Reviewed-on: https://dart-review.googlesource.com/60443
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-19 05:12:13 +00:00
Konstantin Shcheglov 7d94755836 Issue 33471. Use full ResolveResult in Extract Local refactoring.
So, that we can give the file content to CorrectionUtils. Otherwise we
might attempt to use resolved unit for older version of the file
content, and re-read file content.

It does not fully solves the problem, because the client still might
get changes that corresponds to the older state of the file, or
files. We might want to consider un-deprecating fileStamp in
SourceFileEdit.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33471
Change-Id: I4877bc86a14033cc4c944cfaa0265db78b17de4c
Reviewed-on: https://dart-review.googlesource.com/60701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-18 18:22:01 +00:00
Konstantin Shcheglov 209a602769 Tweak for fixes tests - use orElse to avoid exception.
R=brianwilkerson@google.com

Change-Id: Ieefb92172d4d338bffb16071ca648e70c261c5e6
Reviewed-on: https://dart-review.googlesource.com/60454
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-15 20:41:39 +00:00
Konstantin Shcheglov 0e4c158847 Issue 33458. Suggest 'Create Class' Quick Fix for creation without new.
When the identifier is not resolved in Test() it is impossible to
know whether is expected to be a function invocation or an instance
creation. Suggest both.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33458
Change-Id: I898fb85af33d4553b501a9fe3e59d792562d9053
Reviewed-on: https://dart-review.googlesource.com/60452
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-15 20:34:29 +00:00
Konstantin Shcheglov 6f44d3f208 Issue 2287. Move all, but constructors and fields set in constructors, from StatelessWidget into State.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2287
Change-Id: I313973bfd74642d04b35b793c7f463c8050ee9a2
Reviewed-on: https://dart-review.googlesource.com/60221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-14 15:35:00 +00:00
Brian Wilkerson f68298bb57 Add casts to fix dart2 runtime exceptions
Change-Id: I29a9d04fecc94c7f8919026bbc98f695189a6523
Reviewed-on: https://dart-review.googlesource.com/59140
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-06-07 19:40:01 +00:00