Commit Graph

2342 Commits

Author SHA1 Message Date
Konstantin Shcheglov b862410fef Implement search for direct subtypes and enable search.getTypeHierarchy request.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2557543002 .
2016-12-05 14:45:26 -08:00
Konstantin Shcheglov a86fe28658 Send 'analysis.flushResults' on file removal.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2552023002 .
2016-12-05 13:38:21 -08:00
Konstantin Shcheglov 6a9edde070 Issue 27820. Add fix for CompileTimeErrorCode.UNDEFINED_CLASS.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27820

Review URL: https://codereview.chromium.org/2546993004 .
2016-12-03 14:15:41 -08:00
Brian Wilkerson b81564b623 Add support for generating lints when using the new driver
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2545553007 .
2016-12-03 07:25:42 -08:00
Konstantin Shcheglov c0ac1ca8f4 Report analysis exceptions using the 'exceptions' stream or 'completeError'.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2546213002 .
2016-12-02 14:22:40 -08:00
Konstantin Shcheglov 24ffedcef0 Guard against null in EditDomain.
https://github.com/dart-lang/sdk/issues/27974

Paul, this also should fix the issue you see:
NoSuchMethodError: The getter 'element' was called on null.

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

Review URL: https://codereview.chromium.org/2549883002 .
2016-12-02 13:33:32 -08:00
Brian Wilkerson 06bc6e5d33 Guard against missing token (issue 27963)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2547053002 .
2016-12-02 09:14:18 -08:00
Paul Berry 0c31815f1c Transition analyzer and analysis_server to new astFactory.
This is the same as 1d028eed8d (which
was reverted) except that it doesn't remove the old AST factory
constructors (which broke dev_compiler).  The removal of old AST
factory constructors will be done in a follow-up CL so that if it
unexpectedly breaks any other clients we will be able to revert it
without reverting this CL.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2536373008 .
2016-12-01 10:56:21 -08:00
Konstantin Shcheglov 2368a59d60 Add libraries in corrections using SourceInfo instance of LibraryElement.
We are not going to have LibraryElement(s) for the new analysis driver.

The current approach: get known library sources, compute their elements,
import these elements does not work well when there is no analysis cache.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2532393008 .
2016-12-01 10:22:48 -08:00
Vijay Menon b8d3758dcd Revert "Transition analyzer and analysis_server to new astFactory; remove old AST factory methods."
This reverts commit 1d028eed8d.

This was breaking DDC.

TBR=paulberry@google.com

Review URL: https://codereview.chromium.org/2542753002 .
2016-11-30 14:57:49 -08:00
Konstantin Shcheglov c3e2c45cb3 Extract 'computeMissingOverrides' in ErrorVerifier.
So, we can reuse it in Quick Fixes.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2541153002 .
2016-11-30 14:04:43 -08:00
Paul Berry 1d028eed8d Transition analyzer and analysis_server to new astFactory; remove old AST factory methods.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2539243002 .
2016-11-30 12:28:51 -08:00
Konstantin Shcheglov 666d4efce2 Issue 27903. Use shared logic for computing new method location.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27903

Review URL: https://codereview.chromium.org/2538143003 .
2016-11-30 12:15:07 -08:00
Konstantin Shcheglov 4686d364bb Add a new Analysis Server option '--new-analysis-driver-log'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2543713002 .
2016-11-30 12:10:06 -08:00
Konstantin Shcheglov 2537784f92 Stop using Element.unit directly.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2541873002 .
2016-11-30 09:37:55 -08:00
Konstantin Shcheglov 9a9e037e61 Show priority files on the status page.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2542673002 .
2016-11-30 09:25:31 -08:00
Konstantin Shcheglov 0f9a78ff53 Make 'Inline Method' refactoring work with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2540793003 .
2016-11-29 17:12:46 -08:00
Konstantin Shcheglov 6fd063ede5 Update to make Extract/Inline local and Extract Method refactorings work.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2539753003 .
2016-11-29 14:14:32 -08:00
Brian Wilkerson 37387de83a Exclude files from analysis when using AnalysisDriver
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2536303002 .
2016-11-29 13:30:22 -08:00
Brian Wilkerson f88b824e55 Read overlay content when computing completions (issue 27887)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2537513004 .
2016-11-29 09:58:58 -08:00
Brian Wilkerson c443aceb7e Guard against missing line information (issue 27906)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2537753003 .
2016-11-29 09:58:43 -08:00
Konstantin Shcheglov 1fea2bb238 AnalysisErrorWithProperties cannot be reported with the new analysis driver.
Add a check for now to avoid crashes.

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

Review URL: https://codereview.chromium.org/2533043002 .
2016-11-28 10:43:49 -08:00
Konstantin Shcheglov 5ee52c415f Fixes for documentation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2533013002 .
2016-11-28 10:30:07 -08:00
Konstantin Shcheglov a573765c18 Status page for the new analysis driver.
Probably more info should be added with time.
But this lets us see drivers and files.

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

Review URL: https://codereview.chromium.org/2530273004 .
2016-11-28 09:15:31 -08:00
Konstantin Shcheglov 5cbd824762 Fix for search references when the element is null.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2526363002 .
2016-11-28 08:51:40 -08:00
Konstantin Shcheglov 483fa6de3a Prefer a driver to which the file is added.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2533533002 .
2016-11-25 09:28:07 -08:00
Konstantin Shcheglov e0c5a60f3e Remove accidentally committed 'print'.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2523263002 .
2016-11-23 10:00:25 -08:00
Konstantin Shcheglov 9bc4c73e2d Stop returning declaration matches from search for references.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2518183003 .
2016-11-22 12:32:51 -08:00
Konstantin Shcheglov 26307d77b6 Implement SearchEngine for the new driver.
Only search for references, and only to local variables is implemented so far.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2521363003 .
2016-11-22 12:01:52 -08:00
Brian Wilkerson e63105555b Remove uses of configuration data
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2522543007 .
2016-11-22 11:26:08 -08:00
Konstantin Shcheglov 9f1ca4a119 Make AnalysisSErver APIs to access unit/node/element asynchronous.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2526473003 .
2016-11-22 10:46:06 -08:00
Brian Wilkerson a3e1a0d395 Enable generic method support by default
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2488043002 .
2016-11-22 09:16:19 -08:00
Konstantin Shcheglov ab0a8e775f Use single unit/node/element.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2525693002 .
2016-11-22 09:13:31 -08:00
Konstantin Shcheglov e769868325 Issue 27856. Fix for reponding to execution domain requests.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27856

Review URL: https://codereview.chromium.org/2524453002 .
2016-11-21 10:07:09 -08:00
Konstantin Shcheglov 73fccff8ea Make SearchMatch an interface, exclude 'context', move implementation.
Also, mostly drop 'fileStamp' in SourceFileEdit.
Only `-1` is kept when the file is a new one, in other cases it' `0`.
As I can see, IDEA cares only about `-1`.
We don't know modification stamps with the new analysis driver.
But we know content hashes.

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

Review URL: https://codereview.chromium.org/2518903002 .
2016-11-21 10:05:21 -08:00
Konstantin Shcheglov 2301e67340 Put 'finer grained invalidation' back behind the flag.
Unfortunately we see exceptions in the wild, both internally and
externally :-(

For example https://github.com/dart-lang/sdk/issues/27770

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

Review URL: https://codereview.chromium.org/2518843002 .
2016-11-21 08:33:46 -08:00
Dan Rubel 74d713ece9 remove support for analyzer configuration in pubspec
This removes support for having directives like this in your pubspec:

analyzer:
  configuration: test_pack/config

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2511963002 .
2016-11-20 20:44:04 -05:00
Konstantin Shcheglov 4d003da5c8 Enable SDK summaries with --enable-new-analysis-driver flag.
...even if the IDEA does not use 'as-is' mode, it should not be a
problem in fishfooding. Hopefully a new IDEA will be released before
we would want to turn it on for our users.

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

Review URL: https://codereview.chromium.org/2514053002 .
2016-11-18 11:32:01 -08:00
Dan Rubel 9ec7547323 update ContextManager to support analysis option include directive
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2514533002 .
2016-11-17 15:36:33 -05:00
Konstantin Shcheglov 5acc4aba69 Add stubs for requests that currently crash Analysis Server with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2512633002 .
2016-11-17 08:16:22 -08:00
Konstantin Shcheglov 89eabc8083 Evict from FileByteStore by the total cache size in bytes.
Limit the size in Analysis Server to 1 GiB.

Ideally we would need to in constructor all files by access time.
But requesting stats is much more expensive than just length :-(

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

Review URL: https://codereview.chromium.org/2492933002 .
2016-11-14 08:53:32 -08:00
Konstantin Shcheglov 978ab8ed3d Fixes for URI and Object completions with the new driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2499693002 .
2016-11-11 13:53:56 -08:00
Konstantin Shcheglov d0ee9613d4 Fix disposing context with the new driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2489523008 .
2016-11-10 13:13:06 -08:00
Konstantin Shcheglov d3b5ed9808 Support 'edit.organizeDirectives' with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2491953002 .
2016-11-10 09:52:40 -08:00
Konstantin Shcheglov 18b34d0d22 Add AnalysisDriverScheduler.status and extract status support.
Also use this 'status' stream to send analysis notification from DAS.

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

Review URL: https://codereview.chromium.org/2491183002 .
2016-11-10 08:15:31 -08:00
Konstantin Shcheglov 617e1b88ca Support for AnalysisService.OVERRIDES with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2491843002 .
2016-11-10 06:50:26 -08:00
Konstantin Shcheglov 050e16d221 Evict using size in bytes in MemoryCachingByteStore.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2487313002 .
2016-11-09 12:22:32 -08:00
Konstantin Shcheglov b6c02291b8 Notify all drivers about all changed files.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2489063002 .
2016-11-09 11:32:02 -08:00
Paul Berry 1dfa5685ce Update cross-context options encoding to account for patchPlatform.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2486973004 .
2016-11-09 09:12:09 -08:00
Konstantin Shcheglov b22ac9c93d Use AnalysisDriverScheduler to schedule work across multiple AnalysisDriver(s).
I don't like that it lives in the same file, but I'd not like to
expose internals of AnalysisDriver or AnalysisDriverScheduler outside :-(

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

Review URL: https://codereview.chromium.org/2487003002 .
2016-11-08 18:05:16 -08:00