Konstantin Shcheglov
1f52372bfa
Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
...
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.
Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-29 13:46:45 +00:00
Janice Collins
f40ff153a9
Enable --use-fasta-parser with the analyzer by default.
...
Based on Devon's change at:
https://dart-review.googlesource.com/c/sdk/+/67090
Change-Id: I80b7943826e248bf37d9bbbb769330d24b0dd6ae
Reviewed-on: https://dart-review.googlesource.com/70160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Janice Collins <jcollins@google.com >
2018-08-28 19:29:17 +00:00
Konstantin Shcheglov
83324a8db9
Fix for NPE when prefix completion after an expression without type.
...
R=brianwilkerson@google.com
Change-Id: I3ef1c1e1f981e3a5c9ed6da066a1d204c6b3816d
Reviewed-on: https://dart-review.googlesource.com/71620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-27 22:14:01 +00:00
Konstantin Shcheglov
d332cae86e
Refactor PostfixCompletionTest to make invalid tests positive.
...
A clean up before https://dart-review.googlesource.com/c/sdk/+/71620
R=brianwilkerson@google.com
Change-Id: I475d1eab3bb5a54a2035a7b8940c101f662e53a0
Reviewed-on: https://dart-review.googlesource.com/71660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-27 21:06:23 +00:00
Konstantin Shcheglov
8b3a0a8476
Issue 2558. Fixes for 'convert to async function body'.
...
R=brianwilkerson@google.com
Bug: https://github.com/flutter/flutter-intellij/issues/2558
Change-Id: I6e1931a226732b922c2c1695f378d3b59ae09c09
Reviewed-on: https://dart-review.googlesource.com/71560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-27 16:31:14 +00:00
Konstantin Shcheglov
b255f0fab6
Resolve required arguments after named.
...
Change-Id: I2947be1fc20b1455e7865c34e35349977d61f70b
Reviewed-on: https://dart-review.googlesource.com/71382
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-23 22:04:12 +00:00
Brian Wilkerson
aded927ff4
Fix cast exception in ArgListContributor (issue 34227)
...
Change-Id: Ib6db1fcab1b03059261fc35432794efd92524298
Reviewed-on: https://dart-review.googlesource.com/71188
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-22 19:04:35 +00:00
Konstantin Shcheglov
9ef53bde19
Store codeOffset/length code fields and top-level variables.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I4590a38245039a4c60144feab039cf8d0db00677
Reviewed-on: https://dart-review.googlesource.com/71040
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-22 01:53:36 +00:00
Konstantin Shcheglov
34e6aa8ad2
Fix mock SDK and front-end targer in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I7d4a1948fe21720c237f6e36997d29e63dd7ab28
Reviewed-on: https://dart-review.googlesource.com/70983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-21 21:42:23 +00:00
Aske Simon Christensen
f8a96b88e9
It is an error if a final field is not initialized.
...
Bug: https://github.com/dart-lang/sdk/issues/33022
This commit adds an error when a final field is not initialized at all
(and there is at least one generative constructor). A later commit
will add an error for the case where a field is initialized by some,
but not all, generative constructors.
A number of classes in the Dart2js and DDC support libraries use
uninitialized final fields to indicate getters in the corresponding
native classes. This commit adds a temporary whitelist for the
affected files, which can be removed when the fields have been
replaced by external getters.
This is tracked by https://github.com/dart-lang/sdk/issues/33762
Change-Id: I6b5cee230c7cd5554da2b61da7ebddb6b0b9396e
Reviewed-on: https://dart-review.googlesource.com/63781
Reviewed-by: Daniel Hillerström <hillerstrom@google.com >
2018-08-17 12:37:52 +00:00
Brian Wilkerson
f92043c3c8
Get some code completion tests passing under CFE
...
Change-Id: I0b15fd09ae8c1b8bb7d648066edf7a89cfb398a9
Reviewed-on: https://dart-review.googlesource.com/70164
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-16 00:58:44 +00:00
Brian Wilkerson
0bcf767d4d
Clean up more preview-dart-2 related code
...
Change-Id: Id1f81a635727f0f2fafb5dea4178f303c6ca4659
Reviewed-on: https://dart-review.googlesource.com/70143
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-15 14:43:12 +00:00
Brian Wilkerson
964a2fb9bb
Produce fix when super constructor does not exist
...
Change-Id: I8186b42a938a3ad814e624ba5b378c130422209f
Reviewed-on: https://dart-review.googlesource.com/70080
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-15 13:24:32 +00:00
Brian Wilkerson
49437e3bae
Split TooManyArguments to support quick fixes
...
Change-Id: I31511f619cafbce01f68d6e182328567a2bc3523
Reviewed-on: https://dart-review.googlesource.com/70021
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-15 13:24:22 +00:00
Brian Wilkerson
817e2cacb5
Base fixes on UNDEFINED_GETTER rather than UNDEFINED_IDENTIFIER
...
Change-Id: Icf951cbb8b046985df4f6cae6e7e7e1cfab7766a
Reviewed-on: https://dart-review.googlesource.com/69980
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-14 17:50:48 +00:00
Brian Wilkerson
ecad8d67b3
Add fix for getters on parameters
...
Change-Id: I42b34534d9a83dd6802e5a79ea1d69bd4bbef887
Reviewed-on: https://dart-review.googlesource.com/69981
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-14 17:50:14 +00:00
Brian Wilkerson
8f768e7305
Fix an NPE when creating a fix to add a method for an undefined identifier that is not in a class context
...
Change-Id: Id7989b1dc0dc80b820aaf57a746247ac7525ed56
Reviewed-on: https://dart-review.googlesource.com/69660
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-13 17:32:59 +00:00
Brian Wilkerson
d72334e6a2
Prevent NPEs in the fix processor
...
Change-Id: I2a5c12bf6f3aec4c8a504590f39b666c9934e4e4
Reviewed-on: https://dart-review.googlesource.com/68435
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-08-13 17:30:10 +00:00
Brian Wilkerson
978f12c17f
Use void in place of Null in analysis_server
...
Change-Id: Ifef805cb3c0111e237a6147f71a968958d5651e5
Reviewed-on: https://dart-review.googlesource.com/69560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-13 13:16:53 +00:00
Konstantin Shcheglov
5a2a13c8bf
Store and resynthesize codeOffset/codeLength for functions and methods.
...
R=brianwilkerson@google.com
Change-Id: I2106fb407b7488eede8c06112f1ac582b92d6af5
Reviewed-on: https://dart-review.googlesource.com/69400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-10 21:37:02 +00:00
Konstantin Shcheglov
fe0640e3b1
Refactor way of providing file info, set codeRange for units.
...
This fixes a lot of search/refactoring tests, about 200.
R=brianwilkerson@google.com
Change-Id: I6ce5f61a08b8effa73ffde3861ff68eadd1f4e04
Reviewed-on: https://dart-review.googlesource.com/69383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-10 20:43:54 +00:00
Konstantin Shcheglov
0aa8f2d5cb
Fix for some Quick Fix tests by adding CFE generated error codes.
...
R=brianwilkerson@google.com
Change-Id: I2b06dc388a00aa0c8e5ab3db045b3fe8ec02ed5e
Reviewed-on: https://dart-review.googlesource.com/69283
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-10 18:00:46 +00:00
Konstantin Shcheglov
ac973e5ba7
Return SourceSpan with actual length from _CompilationMessage.
...
Change-Id: I883a4ce1b6fc63643db259a0d22e0719b460c109
Reviewed-on: https://dart-review.googlesource.com/69005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-10 16:03:42 +00:00
Konstantin Shcheglov
d69a354026
Put fileEndOffset into ArgumentsJudgment and use to report argument errors.
...
Change-Id: Id79bd71e7147be379e93024591134c12aa598a38
Reviewed-on: https://dart-review.googlesource.com/69221
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-10 15:40:37 +00:00
Brian Wilkerson
cf560fe17b
Fix a couple of the tests failing on the analyzer with fasta parser bot
...
Change-Id: Ie955c2577f60efdc0ec6c8b6da0e90e08b1e5c61
Reviewed-on: https://dart-review.googlesource.com/69011
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-08-09 16:14:56 +00:00
Konstantin Shcheglov
a1ca88f554
Resolve invocation arguments to parameters.
...
R=brianwilkerson@google.com
Change-Id: I76a8ea8221e0a888253af8297fb50c423699e175
Reviewed-on: https://dart-review.googlesource.com/69000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-08 21:38:59 +00:00
Konstantin Shcheglov
eab492385c
Updates for passing / failing analysis_server tests.
...
R=brianwilkerson@google.com
Change-Id: Ica615414f567cf62bb631824f95d9ef45b8a777a
Reviewed-on: https://dart-review.googlesource.com/69003
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-08 20:47:25 +00:00
Brian Wilkerson
77d6758afb
Attempt to fix failing tests on the windows bots
...
Change-Id: I84d16ad2708d4d18b06cdd454d1276b0d3ef8bc0
Reviewed-on: https://dart-review.googlesource.com/69001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-08 19:29:40 +00:00
Brian Wilkerson
83aa463fac
Enable a few more server tests under CFE
...
Change-Id: I5f0bd750d3da7658f836e45f02da5ef157e752ff
Reviewed-on: https://dart-review.googlesource.com/68960
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-08-08 17:13:28 +00:00
Brian Wilkerson
6879e4cedc
Add completion contributor tests for CFE
...
Change-Id: I32fc27a593fa1f94b123195b8c0ad606d6828fef
Reviewed-on: https://dart-review.googlesource.com/68803
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-08-08 15:21:10 +00:00
Brian Wilkerson
6137511849
Add more CFE tests for server
...
Change-Id: I51b36a988c83e2f20f3e76d01fdb09644c2c2ce2
Reviewed-on: https://dart-review.googlesource.com/68760
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-08-08 15:01:32 +00:00
Konstantin Shcheglov
69f216d4f1
Fix mock SDK and Flutter to pass some Flutter tests.
...
R=brianwilkerson@google.com
Change-Id: If5bbbd608d6a5ed378bb161ad36850df2c5b8533
Reviewed-on: https://dart-review.googlesource.com/68820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-07 20:44:15 +00:00
Konstantin Shcheglov
80e08e0913
Use 'useCFE' flag to turn on CFE in AnalysisDriver.
...
R=brianwilkerson@google.com
Change-Id: If0aa7d10bc46f1dd408d0be8128fc25538758359
Reviewed-on: https://dart-review.googlesource.com/68720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-08-07 16:12:47 +00:00
Brian Wilkerson
bc8a8386af
Fix tests that reference the flutter package
...
Change-Id: Idd1949db259d747abb063328901f42be29ba57b2
Reviewed-on: https://dart-review.googlesource.com/68581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-07 15:48:37 +00:00
Brian Wilkerson
b0de4d8ac0
Add support for and a few additional CFE-based tests
...
Change-Id: I8e52f41cc54341c4321e688ae46a6392e69f98ab
Reviewed-on: https://dart-review.googlesource.com/68500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-06 21:04:02 +00:00
Konstantin Shcheglov
758e5ea502
Use '=' for default values of named parameters.
...
R=brianwilkerson@google.com
Change-Id: I694c9e411fc125ae7b716d0f8b9e78c5cac57e34
Reviewed-on: https://dart-review.googlesource.com/68180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-08-02 19:34:52 +00:00
Brian Wilkerson
87f753dbd3
Replace some declarations of element with declaredElement
...
Change-Id: Idd62472b16cccaa98749a510197ec8d0f5053cb1
Reviewed-on: https://dart-review.googlesource.com/67820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2018-08-02 16:00:36 +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
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
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
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
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
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
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