Commit Graph

80 Commits

Author SHA1 Message Date
Brian Wilkerson b936ffb329 Move several libraries out of the public API
Change-Id: I8259de00134310f25b1c6168940aea5190488999
Reviewed-on: https://dart-review.googlesource.com/51443
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-17 17:35:27 +00:00
Brian Wilkerson d06dbb2ba8 Make most of the server Dart 2 safe
Change-Id: Ic9e8ea2557d01c05caedc126486778865af0396d
Reviewed-on: https://dart-review.googlesource.com/48262
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-24 15:33:53 +00:00
Konstantin Shcheglov 94d8d6bf3b Remove unnecessary cast and wrapping Future.
R=brianwilkerson@google.com

Change-Id: I7b164019e55274c58f13fc67d0dc92e47f01aad7
Reviewed-on: https://dart-review.googlesource.com/40466
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-09 20:25:19 +00:00
Paul Berry 105b170ddb Roll package test to 0.12.29+1 and stack_trace to 1.9.0
This required some changes to analysis_server, since analysis_server
used to have its own version of pumpEventQueue().  Since
pumpEventQueue() is now provided by the test package, I've removed
analysis_server's version, and I've updated some of the call sites to
pass in "times: 5000" to replicate the old analysis_server behavior.

This also required some changes to analyzer, since the fail() method
is now marked as @alwaysThrows, so no code may follow it without
producing a dead code hint.

Change-Id: Ie5ef3a5cc685c18da02de699e59f63f3bb8865f7
Reviewed-on: https://dart-review.googlesource.com/32683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-01-07 14:22:23 +00:00
Brian Wilkerson e8b617217f Remove most of the remaining references to AnalysisContext
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3007493002 .
2017-08-23 12:57:09 -07:00
Konstantin Shcheglov b1589bf879 Replace typed_mock with mockito in analysis_server.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2991773002 .
2017-07-26 08:14:25 -07:00
Brian Wilkerson 55d735911b Remove the unused operations queue
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2957643002 .
2017-06-23 09:04:13 -07:00
Brian Wilkerson fb982f5476 Make server use the common protocol classes
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2879273002 .
2017-05-15 09:35:46 -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
Lasse Reichstein Holst Nielsen d4c1531b5b Use the *correct* type for the fix to analysis_server/test/mocks.dart.
It's a stream, not an iterable, so the return type is a Future.

Review-Url: https://codereview.chromium.org/2784363003 .
2017-03-31 16:36:24 +02:00
Lasse R.H. Nielsen 83298690b0 Fix static typing problem in analysis_server tests.
After changing argument of `Future` constructor to be `()->FutureOr<T>`,
the `()->Future<dynamic>` argument didn't work.
Problem compounded by return type of `Stream<T>.firstWhere` being `dynamic`.

R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2794503002 .
2017-03-31 14:12:32 +02: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
Florian Schneider 2a6847de41 Make some pkg tests less timing-dependent.
Testing should not depend on how long it takes to get a response from the
analysis server.

Depending on how long an analysis step takes, these tests will randomly fail
e.g. when run in -mdebug mode, or with other VM flags that change (i.e. slow-down)
timing (--trace-compiler, --optimization-counter-threshold=5"

There are probably more problematic places like this. I just fixed the ones that
I saw failing when running with --optimization-counter-threshold=5.

BUG=#26556
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2016993004 .
2016-05-30 12:14:16 +02:00
Harry Terkelsen 1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Brian Wilkerson 3bf8b18680 More strong mode clean-up in server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1966453002 .
2016-05-09 13:24:56 -07:00
Brian Wilkerson 166f23e13f Code clean-up
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1907323002 .
2016-04-22 09:05:01 -07:00
Brian Wilkerson 3ab253b977 More steps toward making server strong mode clean
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1900503002 .
2016-04-18 07:52:42 -07:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
Konstantin Shcheglov 72cf3cbe91 Remove unnecessary 'noSuchMethod' declarations.
Also format these file.
I don't like how the new formatter changed the code :-(

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1507813004 .
2015-12-08 11:39:37 -08:00
Brian Wilkerson ea3ba0e31f Remove deprecated code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1502213002 .
2015-12-07 10:24:36 -08: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
Konstantin Shcheglov e9d2f739ad More tweaks in attempt to debug the reason of failing getNavigation() tests.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1284933002 .
2015-08-11 11:13:48 -07:00
Paul Berry 46c284abdf Stop optimizing uses of "pub list".
The use case which made this optimization necessary is now gone, and
it's getting in the way of refactoring ContextManager.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1256793006 .
2015-07-24 10:42:25 -07:00
brianwilkerson@google.com 81e474c43e Clean up many generated constructors
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45676 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 19:06:12 +00:00
kevmoo@google.com 9d88c5c476 pkg/analysis_server: don't explicitly import matcher - use exports from unittest
This will avoid breaks when the test package is checked in
Also remove exec bit from root files

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45657 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 20:57:44 +00:00
paulberry@google.com 7e53bd2b1f Avoid redundant calls to "pub list" when multiple dependencies change.
BUG=dartbug.com/22574
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45170 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 16:02:18 +00: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
scheglov@google.com 01126e0213 Issue 22492. Increase number of event pumping cycles.
I'm not sure if it is going to fix the problem.
I cannot reproduce it with x86 release build on Win7.
But that's the best guess I have.

R=brianwilkerson@google.com, paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22492

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43922 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 18:35:06 +00:00
scheglov@google.com c93b24904d Issue 22157. Cancel a pending refactoring request on receiving a new one.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22157

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43201 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:24:19 +00:00
scheglov@google.com 7db81a77c0 Make AnalysisServer.onAnalysisComplete a Future and wait for it before refactoring.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43158 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 22:31:51 +00:00
scheglov@google.com 3226596c3c Prioritize analysis operations for contexts with priority files.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43118 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 19:29:05 +00:00
scheglov@google.com 96462aab53 Send notifications using separate server operations.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42970 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 20:11:47 +00:00
scheglov@google.com 93eea56a86 Catch and report exceptions in computers.
So, they will not cause the server crash anymore.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42841 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 21:14:08 +00:00
scheglov@google.com b8da9bc651 Format and sort analyzer and analysis_server packages.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
scheglov@google.com 439a5a9df2 Remove from AnalysisServer the 'test_' methods which now has non-test implementations.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40914 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-05 19:57:15 +00:00
jwren@google.com 944174f36a Move package_map_provider.dart from the server to the analyzer package to be used by the command line analyzer.
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40051 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 20:36:35 +00:00
paulberry@google.com 77a6daa667 Add error condition INVALID_OVERLAY_CHANGE to analysis server.
R=danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39925 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 19:23:55 +00:00
scheglov@google.com 5033317a13 Split channels library.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39881 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 17:53:16 +00:00
paulberry@google.com 245168938e Merge analysis server's mocks.dart and mocks2.dart into one file.
There were competing implementations of MockAnalysisContext and
MockSource, but one of the implementations was only used in one place
(analysis_server_test.dart), so it's been switched over to use the
other implementation.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39826 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 19:45:42 +00:00
scheglov@google.com 5dda914674 Implement 'edit.getRefactoring' for rename refactoring.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39509 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-23 21:14:25 +00:00
paulberry@google.com 7226309842 Import analysis_services.dart into analysis_server.dart.
Having two separate packages doesn't really have any benefit, and has
the downside of forcing us to carefully avoid circular dependencies
between the two.  It makes more sense to just combine them.

This is largely a mechanical change consisting of the following renames:

1. pkg/analysis_services/lib/src/* -> pkg/analysis_server/lib/src/services/*
2. pkg/analysis_services/lib/* -> pkg/analysis_server/lib/src/services/*
3. pkg/analysis_services/test/* -> pkg/analysis_server/test/services/*

There were 4 instances where 1 and 2 created a collision:
.../services/correction/assist.dart, .../services/correction/fix.dart,
.../services/refactoring/refactoring.dart, and
.../services/search/search_engine_internal.dart.  To fix the
collision, the files coming from pkg/analysis_services/lib/src were
renamed to "..._internal.dart".

In addition, pkg/analysis_services/test/test_all.dart was modified to
call pkg/analysis_services/test/services/test_all.dart.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39349 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 20:17:49 +00:00
scheglov@google.com eda90c0529 Support for pubspec based contexts in subfolders.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39036 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 15:55:06 +00:00
paulberry@google.com 6c74d75f6d Make "server.shutdown" exit the analysis server.
Also update integration tests so that they use "server.shutdown" to
terminate each test.  This ensures that repeatedly running integration
tests does not cause an accumulation of analysis server temporary
files.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38739 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 17:38:40 +00:00
scheglov@google.com b3054315da Send responses for any pending 'analysis.getErrors' requests during context removal.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38544 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 17:34:06 +00:00
danrubel@google.com 2bd9f4ec92 first cut simple code completion results
- not all CompletionSuggestions implemented yet
- results valid in only a few situations
- more to come

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38347 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 21:11:39 +00:00
scheglov@google.com 0597e61ba3 Move index/search to services.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38045 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 22:24:59 +00:00
scheglov@google.com bf61f59c82 Extract testing utilities into a separate package.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38039 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 20:50:59 +00:00
scheglov@google.com 9e33b85c31 Move file_system libraries into 'analyzer'.
I still end up including memory FS into 'analyzer' because tests for ResourceUriResolver use it.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38034 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:57:42 +00:00