Commit Graph

3160 Commits

Author SHA1 Message Date
Brian Wilkerson ebf5fbcd0e Remove references to the linter plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2567863002 .
2016-12-10 10:00:20 -08:00
YoungSeok Yoon 82ee421bb0 Use the new path to the linter package (#28062) 2016-12-09 21:52:32 -08:00
Brian Wilkerson 7f36a0d403 Get all integration tests running with the new driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2564863003 .
2016-12-09 16:12:52 -08:00
Konstantin Shcheglov 9ab69ab984 Implement SearchEngine.searchAllSubtypes() with the analysis driver.
Inline getSubClasses().

Add a couple of tests for SearchEngineImpl2 itself.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2564913002 .
2016-12-09 09:32:49 -08:00
Brian Wilkerson c99adefae7 Get some tests running using the analysis driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2562083002 .
2016-12-09 08:32:39 -08:00
Konstantin Shcheglov 685b956840 Set empty namespaces for public/exportNamespace of synthetic libraries.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2556253004 .
2016-12-08 08:15:04 -08:00
Paul Berry ae6fd961a1 Prepare for decoupling analyzer ASTs from element model.
This CL creates top level accessor functions which may be used to map from AST data structures to their corresponding elements and types, and begins using those accessor functions throughout the SDK.  It also adds empty interfaces ResolutionTarget and ResolutionType, which are implemented by Element and DartType respectively.

In a future CL, I will change the types stored in the AST to ResolutionTarget and ResolutionType, rather than specific element types; this will decouple the ASTs from the element model.  The presence of the accessor functions will allow clients to continue accessing elements and types in a type-safe way.

R=asgerf@google.com, brianwilkerson@google.com, scheglov@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/2551023005 .
2016-12-07 11:08:14 -08:00
Brian Wilkerson 0ea654a068 Remove the AnalysisOptionsProcessor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2559523005 .
2016-12-07 10:51:33 -08:00
Brian Wilkerson 20baedc660 Reapply "Move the linter core to the analyzer package"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2559773002 .
2016-12-07 09:57:17 -08:00
Paul Berry 1a172e935b Revert "Move the linter core to the analyzer package"
This reverts commit 6d9d5f53a1, which
was causing analysis server unit tests to fail.

TBR=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2561573003 .
2016-12-07 05:36:46 -08:00
Konstantin Shcheglov 402cd0b646 Implement 'Import Library' Quick Fix for the new analysis driver.
It turned out to be easier than I thought is would be.

The potential problem was to find correspondence between AnalysisResult
and the AnalysisDriver instance to request top-level declarations in.
But if we just include the AnalysisDriver into AnalysisResult, this
solves the problem.

This creates another problem though - now we need to be careful to
not cache an instance of AnalysisResult for a long time.

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

Review URL: https://codereview.chromium.org/2549143007 .
2016-12-06 15:00:53 -08:00
Konstantin Shcheglov 57c3002ede Implement 'Import Library' Quick Fix for project libraries using TopLevelDeclarationInSource.
Only the current implementation is done.

Implementation for the new analysis driver is not linked yet.

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

Review URL: https://codereview.chromium.org/2554113003 .
2016-12-06 14:24:22 -08:00
Brian Wilkerson 6d9d5f53a1 Move the linter core to the analyzer package
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2553203002 .
2016-12-06 09:42:26 -08:00
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 61183b2be9 Remove @failingTest for the now passing test.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2554633002 .
2016-12-05 13:41:03 -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
Brian Wilkerson 203cf1d057 Remove unused import
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2549993002 .
2016-12-04 16:03:47 -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
Michael R Fairhurst 7e04b119aa Add a performance benchmark for the angular analyzer plugin (#27932) 2016-12-02 12:06:10 -08:00
Brian Wilkerson c75c14db54 Only generate summaries, in tests, when necessary
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2547953002 .
2016-12-02 12:01:51 -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
Brian Wilkerson e17e359faa Create summary files in MockSdk classes
Review URL: https://codereview.chromium.org/2542853003 .
2016-12-02 07:32:39 -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 f189796d68 Implement getLinkedBundle() for MockSdk in analysis_server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2525203002 .
2016-11-28 08:32:34 -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