Commit Graph

136 Commits

Author SHA1 Message Date
Konstantin Shcheglov b3fe985371 Use AnalysisDriver.getCachedResult() for 'implemented' notification.
In general case we cannot use getResult() in this notification.
We generate these notifications after analysis is complete in scheduler.
But if there is no cached result, getResult() will schedule analysis.
So, we might get into a loop.

In practice this worked, because IDEA always makes files priority,
so their results cached, and then subscribes for notifications.
But in general case we need this protection.

This also means that the 'implemented' notification works (and will
work) only for priority files.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2965533002 .
2017-06-29 09:57:20 -07:00
Konstantin Shcheglov 911263f240 Remove the old index.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963773003 .
2017-06-28 13:44:05 -07:00
Brian Wilkerson 9ddb832e10 Generate constants in server as we do in plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2960073002 .
2017-06-28 08:21:33 -07:00
Brian Wilkerson e0216fef7f Remove ability to disable new analysis driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2937323003 .
2017-06-19 08:13:14 -07:00
Brian Wilkerson a0d7d64f0b Convert more tests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2936123002 .
2017-06-13 19:38:59 -07:00
Brian Wilkerson f65c7ecbdf Fix a recent regression with nested contexts
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2903303002 .
2017-05-25 13:17:08 -07:00
Brian Wilkerson c1a7070770 Add the ability to whitelist plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2897653002 .
2017-05-19 08:48:32 -07:00
Brian Wilkerson daffcecc11 Pass the sdk path to plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2885993004 .
2017-05-17 08:19:49 -07:00
Brian Wilkerson 27f9e5e4ce Reverse the sense of the flag to make it easier to find test that need to be converted
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2884593003 .
2017-05-15 08:40:40 -07:00
Brian Wilkerson e55812a3f2 Unify the server and plugin versions of the generators
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2844273003 .
2017-04-28 07:46:29 -07:00
Brian Wilkerson 207fffe067 Send re-analyze requests to plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2843093002 .
2017-04-26 12:36:26 -07:00
Brian Wilkerson 65f492a043 Add support for watch events and error notifications
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2842013003 .
2017-04-26 09:36:26 -07:00
Brian Wilkerson 5695e95902 Add support for three more plugin requests
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2834993002 .
2017-04-22 09:02:30 -07:00
Brian Wilkerson aa36e43426 Add plugin support for getAssists
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2832643005 .
2017-04-20 13:52:34 -07:00
Konstantin Shcheglov 44bab19cb3 Implement 'analysis.analyzedFiles' notification with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2612723002 .
2017-01-04 07:12:47 -08:00
Brian Wilkerson 86c62a6bad Remove the command-line plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2565993002 .
2016-12-11 10:59:19 -08:00
Brian Wilkerson a01afcd1d1 Remove the options plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
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
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
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
Brian Wilkerson 3155b1e08c Remove unused method and field from DartSdkManager
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2415413003 .
2016-10-14 09:53:44 -07:00
Brian Wilkerson 0f364bfac2 Fix more tests on windows bots
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2404733002 .
2016-10-09 11:57:40 -07:00
Konstantin Shcheglov de4d8b3a78 Switch analysis_server to use 'package:test'.
I'm changing DEPS in the corresponding analyzer CL.

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

Review URL: https://codereview.chromium.org/2394683006 .
2016-10-06 08:47:15 -07:00
Brian Wilkerson 685e4ff9e1 Revert "Remove unused option in server API"
Review URL: https://codereview.chromium.org/2382033003 .
2016-09-30 10:14:12 -07:00
Brian Wilkerson 2972bd0d6b Remove unused option in server API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2382053002 .
2016-09-30 09:04:38 -07:00
Brian Wilkerson 6ccbef94fc Convert analysis server over to use ContextBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2286923002 .
2016-08-29 08:11:53 -07:00
Konstantin Shcheglov 90c7698f1b 'Extract Local' and 'Inline Local' refactoring need only single file analysis.
We still analyze more than we actually need - we don't need the full
RESOLVED_UNIT, we could live with some much lower RESOLVED_UNITx. But it
might be fast enough for practical purposes to compute fully resolved
units.

Maybe we should set up monitoring for refactoring times...

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2262393003 .
2016-08-22 18:59:55 -07:00
Brian Wilkerson 9c5213a077 Generalize DartSdkManager to support embedder SDKs
R=pquitslund@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2107793002 .
2016-06-28 13:48:57 -07:00
Konstantin Shcheglov c675ba270f Pass AnalysisOptions into SdkCreator, disable changing afterwards.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1830703002 .
2016-03-23 13:11:49 -07:00
Konstantin Shcheglov bd76934452 Remove old index and search implementations.
Also rename the new implementation files and classes to remove the
'2' suffix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1801883002 .
2016-03-14 12:19:40 -07:00
Brian Slesinsky ae009e0870 Fix regression for import suggestions
Imports weren't being suggested for implicit source files,
for example files from other analysis roots.

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

Review URL: https://codereview.chromium.org/1759333002 .
2016-03-09 12:59:46 -08:00
Konstantin Shcheglov c9e82c7e67 Fill the new index in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1749333004 .
2016-03-02 14:00:17 -08:00
danrubel 3fc06a4aa7 abort completion request - fixes #24271
This CL aborts completion requests (returns empty list of completions)
if either a newer completion request is received
or the source changes after the completion request was received.

In addition, I wrapped calls to AnalysisFutureHelper computeAsync
in exception handlers so that it will be easier to track async exceptions
back to the code that requested the computations.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1685653002 .
2016-02-10 12:45:53 -05:00
Brian Wilkerson bdd0d637fe We need to perform analysis differently based on some option settings (such as strong mode), but there is currently a single SDK that is shared across all contexts no matter which option values are being used. This causes us to inconsistently analyze different portions of the SDK depending on which outer context was the first to request the analysis.
This is at least a first step toward solving this problem by allowing multiple SDKs to be created, one for each unique set of options.

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

Review URL: https://codereview.chromium.org/1686613002 .
2016-02-09 11:05:34 -08:00
Konstantin Shcheglov 5dc34340a1 Issue 25538. Fix for notification and private methods.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538

Review URL: https://codereview.chromium.org/1610773003 .
2016-01-21 08:01:51 -08:00
Brian Wilkerson 600fc17de1 Clean-up the registration of plugins
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -08:00
danrubel 6fb4f45d6b - move completion contributor extension into new DartCompletionPlugin
- change DartCompletionContributorFactor to return single contributor rather than list of contributors
- remove server field from completion request
- update comments per prior review

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1484853002 .
2015-11-30 13:53:22 -05:00
Brian Wilkerson 4ae8540383 Revert "Clean-up the registration of plugins"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1465983004 .
2015-11-20 14:04:53 -08:00
Brian Wilkerson b2728c15a6 Revert "Fix test failures on the bots"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1468623002 .
2015-11-20 14:04:11 -08:00
Brian Wilkerson 6b45d6544c Fix test failures on the bots
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1467623002 .
2015-11-20 11:48:35 -08:00
Brian Wilkerson 1367d2d47d Clean-up the registration of plugins
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1460123002 .
2015-11-20 08:14:14 -08:00
pq 52fb3b3bab Introducing a lint server plugin.
Avoids introducing an unwanted dependency on the options plugin to server (efects discovered: https://codereview.chromium.org/1411313005/). Also soon to be future home for fixes and completions.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1410553005 .
2015-10-26 12:11:38 -07:00
Konstantin Shcheglov c7907e7800 Support for searching files by import/export/part URIs and library identifiers.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1417483006 .
2015-10-20 08:52:02 -07:00
Brian Wilkerson 9ad256cf18 Move the wire protocol support into the public API
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1398293002 .
2015-10-11 07:34:28 -07:00
pq 695256d586 Linter hookup into AS.
Note the TODO to fix the extension manager interaction hijinx.  Really we should ensure that we are only using the one in engine.  At the moment, it's easy to get this wrong (as the initialization heroics herein testify).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1392683003 .
2015-10-09 13:40:07 -07:00
Konstantin Shcheglov dfd09f3f66 Extension point for AnalysisResultListener(s).
The plan is that plugins will listen for computed results. For example the Angular
plugin will listen for DART_TEMPLATES and once it sees one, it will schedule
sending the navigation notification, because now the other extension - NavigationContributor
can produce its navigation regions.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1303343008 .
2015-09-04 09:56:27 -07:00
Paul Berry 2f6ebaa774 Only send "analysis.analyzedFiles" notification when the set of files changes.
R=jwren@google.com

Review URL: https://codereview.chromium.org//1233003002 .
2015-07-13 15:52:28 -07:00
Brian Wilkerson 2ffa8de794 Add notification of analyzed files
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1232393005 .
2015-07-13 15:07:33 -07:00
Brian Wilkerson ad52c9eab9 Add support for specifying files needing analysis
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1152013002
2015-05-21 14:34:04 -07:00
brianwilkerson@google.com cd58e290c4 Reformat
R=paulberry@google.com

Review URL: https://codereview.chromium.org//969113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44151 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 22:43:12 +00:00