Commit Graph

44 Commits

Author SHA1 Message Date
Jaime Wren 0b5a7c847d Add support for intermittent filesystems to the analysis server, this PR is a synced version of Devons PR https://dart-review.googlesource.com/c/sdk/+/72980, without the DAS protocol change.
Change-Id: I6ad1d423c2616ae31fc3f5954782d05e3d8adbda
Reviewed-on: https://dart-review.googlesource.com/73689
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2018-09-20 22:54:59 +00:00
Brian Wilkerson 95d1ebd9f0 Fix one cause of timeouts in tests
Change-Id: I8514c7a1e89c69bbbf11882fa734903cd7c7569c
Reviewed-on: https://dart-review.googlesource.com/68430
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-06 16:08:05 +00:00
Brian Wilkerson b941f148a7 Remove uses of the old plugin model from the analysis server
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3001413002 .
2017-08-23 07:42:13 -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 fcb23e967c Remove the unused class SingleContextManager
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2945313002 .
2017-06-21 11:21:25 -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
Devon Carew 7f83d9d173 Add a diagnostic.getServerPort analysis server request.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2703033002 .
2017-02-19 15:19:40 -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
Konstantin Shcheglov 05a86a7495 Remove 'initializeTestEnvironment' from 'analysis_server'.
Also fixes the server_options_test.dart:22 test broken in https://codereview.chromium.org/2394683006/

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

Review URL: https://codereview.chromium.org/2402483002 .
2016-10-06 10:26:17 -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 c41427383b Deprecate DirectoryBasedDartSdk and transition existing uses to the new API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2242853002 .
2016-08-12 09:18:12 -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
Jaime Wren b7aff9c72f Initial Bazel file resolver support.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2079873002 .
2016-06-17 14:20:55 -07:00
Brian Wilkerson 34a71429d9 Remove hook for setting a provider for an EmbedderUriResolver
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2075663002 .
2016-06-16 10:28:40 -07:00
Konstantin Shcheglov c6257ba52b Add Driver.useSingleContextManager to turn on single context manager.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1915833007 .
2016-04-26 10:29:48 -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
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
pq 37767eff86 Hooks for injecting embedder resolver providers.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1666573006 .
2016-02-04 11:03:43 -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
Brian Wilkerson b233ab26ad Remove unused setter from ServerStarter and un-deprecate a used setter
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1341343002 .
2015-09-15 09:38:56 -07:00
Brian Wilkerson 908708d655 More fixes for failures on the Windows bot
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
Brian Wilkerson 0c6872acef Hook for overriding the ContextManager and some code clean-up (with more to follow)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1223413003 .
2015-07-13 10:20:13 -07:00
Brian Wilkerson bdfc16a146 Hook for overriding the creation of a package resolver
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1214243005.
2015-07-06 13:06:33 -07:00
brianwilkerson@google.com ac3613e2bb Re-apply change to move to plugin package
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45408 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-24 18:54:24 +00:00
brianwilkerson@google.com 3d536efcfe Revert breaking change
Review URL: https://codereview.chromium.org//1101213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45384 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 22:12:20 +00:00
brianwilkerson@google.com 24c853446a Convert analyzer and analysis_server to use the plugin package
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45382 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 20:32:35 +00:00
brianwilkerson@google.com b36c00f15f Temporarily move plugin support
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44586 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 19:06:22 +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
brianwilkerson@google.com 11c0e607a0 Make domains plugable
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42756 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 22:15:20 +00:00
scheglov@google.com 8affb6c015 Upgrade unittest to be able to use isNotEmpty.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42380 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 04:07:37 +00:00
brianwilkerson@google.com 44b69647a3 Rework instrumentation API
R=danrubel@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42321 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-12 16:00:23 +00:00
brianwilkerson@google.com 0a8dc970d2 Hooks for instrumentation
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42218 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-09 20:14:42 +00:00
scheglov@google.com 283b78e260 Add --enable-incremental-resolution option.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41971 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 20:53:10 +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
danrubel@google.com e7bdefffba update error handling to send response with stack trace
BUG=dartbug.com/20893
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40237 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 12:30:07 +00:00
danrubel@google.com a9a2c98d53 gracefully handle internal exceptions during request
- new SERVER_ERROR response code
- return SERVER_ERROR response if exception when processing request before request can be sent
- send server.error notification if exception occurs anytime while processing request or future work triggered by request

BUG=dartbug.com/20893
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40198 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 05:01:46 +00:00
paulberry@google.com 3123e48d29 In the analysis server API, change RequestError.code to an enum.
Some of the error codes that were previously defined are no longer
used, so those have been removed.  The enum reflects the set of errors
that are currently in use.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39689 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-29 07:30:43 +00:00
paulberry@google.com 0c0fd777a6 Finish modifying analysis server to make use of code generation.
Generated code is used to produce the response to these requests:
- analysis.updateOptions
- analysis.updateContent
- analysis.setSubscriptions
- analysis.setPriorityFiles
- analysis.setAnalysisRoots
- server.shutdown
- server.setSubscriptions

Generated code is used to produce these requests:
- server.shutdown
- server.getVersion
- server.shutdown
- server.connected

Generated code is used to produce these notifications:
- completion.results
- analysis.overrides
- analysis.outline
- analysis.occurrences

Generated code is used to decode these notifications:
- server.status

In addition, some dead code was removed, the 'protocol.dart' and
'protocol2.dart' files were combined, and the fields Response.result,
Request.params, and Notification.params were made private (to
encourage future use of the generated code).  Also, some overly
verbose import statements were cleaned up by using "hide" rather than
"show".

R=danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39516 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 10:48:16 +00:00
paulberry@google.com e18327f317 Make more use of generated code in analysis server.
The following generated classes are now used:
- CompletionRelevance
- CompletionSuggestion
- CompletionSuggestionKind
- ErrorFixes
- HighlightRegion
- HighlightRegionType
- HoverInformation
- LinkedEditGroup
- LinkedEditSuggestion
- LinkedEditSuggestionKind
- SourceChange

Generated code is used to produce these notifications:
- analysis.errors
- analysis.highlights
- analysis.navigation
- search.results
- server.error
- server.status

Generated code is used to produce the response to these requests:
- analysis.getErrors
- analysis.getHover
- edit.getAssists
- edit.getFixes
- server.getVersion

Generated code is used to handle these notifications in unit testing:
- analysis.highlights
- analysis.navigation

In addition, these methods have been removed, since they are no longer
needed:
- Notification.getParameter
- Result.setEmptyResult
- Result.setResult

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39511 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-24 08:39:41 +00:00
paulberry@google.com 9f49af72fc As a temporary measure, allow SDK to be specified on analysis server cmd line.
Once the 'analysis.updateSdks' request is functional, this should be
unnecessary.  But for now, allow the default SDK to be set via the
command line so that we don't block development of editor plugins.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38443 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-21 21:50:59 +00:00
brianwilkerson@google.com 58ee598e04 Adjust server for API changes
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37368 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-16 18:41:04 +00:00
scheglov@google.com 24c8f1f4b2 Extract constants into separate libarary.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36828 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 18:37:44 +00:00
paulberry@google.com 93deb52cd6 Add a message for analysis server to indicate a successful connection.
This complements the "server already started" error introduced in
r35046.  It's now easy for the client to detect whether a connection
to the server was successful--it simply connects and waits for the
initial message from the server.  The message returned on a successful
connection is:

{"event":"server.connected"}

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35108 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 15:11:35 +00:00
paulberry@google.com 33c7e78bb0 Split analysis server's HttpAnalysisServer into two classes.
Behaviours of the HttpAnalysisServer which are independent of the
WebSocket transport mechanism have been moved to a new class,
SocketServer, which will also be used when the transport mechanism is
stdio.

GetHander now holds a reference to the SocketServer rather than the
AnalysisServer, so that we don't need to go to extra effort to update
it when the AnalysisServer is created.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35061 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-15 15:41:09 +00:00