danrubel@google.com
c263b483a7
allow client to specify any combination of add/modified/removed
...
BUG=
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//288013003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36216 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-15 11:49:21 +00:00
paulberry@google.com
839e807406
Leave "error" key out of response JSON when there is no error.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//282993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36169 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 15:04:31 +00:00
danrubel@google.com
a08555d604
new ByteStreamClientChannel
...
BUG=dartbug.com/18632
R=paulberry@google.com
Review URL: https://codereview.chromium.org//276113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36059 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 20:17:57 +00:00
scheglov@google.com
fa5f1af052
New analysis_server snapshot and completion.dart in analysis_services.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//263213007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35817 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 18:54:51 +00:00
scheglov@google.com
77fbba6bf0
Translate parts of engine.services project.
...
Some tweaks for Java implementations to get valid or better Dart code.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//250823006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35466 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-26 19:01:13 +00:00
paulberry@google.com
5d44255126
Trigger analysis when context.applyChanges request is received.
...
With this change, the analysis server is now capable of analyzing a
source file and responding with error notifications.
R=jwren@google.com
Review URL: https://codereview.chromium.org//246013007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35373 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 14:58:15 +00:00
paulberry@google.com
22ee284c47
Serialize AnalysisErrors to JSON in the analysis server.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//247893004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35329 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 20:35:43 +00:00
paulberry@google.com
19572ac352
Use AnalysisServer.running only to track whether server has been shut down.
...
Previously, AnalysisServer.run() and AnalysisServer.performTask() also
tried to use this variable to track whether there was a pending call
to performTask() on the event queue. The resulting confusion
prevented analysis from ever running.
It turns out that we don't need to separately track whether there is a
pending call to performTask(), as long as we enforce the invariant
that there is a pending call to performTask() exactly when
contextWorkQueue is non-empty.
R=brianwilkerson@google.com , danrubel@google.com
Review URL: https://codereview.chromium.org//246603005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35323 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 18:35:58 +00:00
scheglov@google.com
89c918f8f4
New analysis services snapshot.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//247813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35271 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 17:30:49 +00:00
paulberry@google.com
451b5519cb
Consistently type check analysis server request parameters.
...
Introduces a class RequestDatum, which wraps request parameters (or
components thereof) and provides type checking and coercion.
RequestDatum also provides an operator[] so that nested parameters can
be type checked and coerced at every level of nesting.
Previously, our checking and coercion was ad-hoc, and as a result some
parameters weren't type checked at all.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//245113006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35228 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-21 22:21:39 +00:00
paulberry@google.com
a1a3ae4eeb
Fix a typo in the analysis server's status page
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//243383004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35186 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-18 22:26:49 +00:00
paulberry@google.com
783aca1892
Analysis server context ID is now specified by the client.
...
This allows the client to start sending commands that use the context
immediately, without having to wait for a response to find out the
context ID.
If the client tries to create two contexts with the same ID, that is
an error.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//243753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35185 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-18 22:20:53 +00:00
scheglov@google.com
0d16b4e5ca
Translate server interfaces and navigation/outline computers.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//242373005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35182 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-18 20:16:01 +00:00
paulberry@google.com
f548643064
Exit stdio-based analysis server when stdin closed.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//235953019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35116 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 17:34:35 +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
13f0c014d6
Create analysis server ByteStreamServerChannel class.
...
This class serves a parallel role to the existing
WebSocketServerChannel interface, except that it handles exchanging
data with stdio rather than with a WebSocket.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//238293006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35088 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-15 21:43:00 +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
paulberry@google.com
ab56da71ce
Fix race condition with "server already started" error.
...
We can't report the "server already started" error prior to the call
to WebSocketTransformer.upgrade(), because it's possible that a
different client will successfully establish a connection during the
upgrade process. Instead, check after the call to upgrade(). This
means that if there is an error, we have to report it via a
RequestError object rather than using an HTTP error.
When we add stdio as a transport mechanism, this will have the further
advantage of allowing the "server already started" error to be
detected by code that is independent of the transport mechanism.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//237793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35046 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-14 22:13:10 +00:00
scheglov@google.com
b8ac1a83a0
Improve analysis_server/protocol.dart test coverage.
...
R=brianwilkerson@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//227713004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34794 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 19:01:10 +00:00
brianwilkerson@google.com
7e7426ae99
Clean-up and progress on analysis server
...
R=danrubel@google.com
Review URL: https://codereview.chromium.org//214933002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34529 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 21:26:03 +00:00
lrn@google.com
6f76a96fcf
Introduce class Sink<T>.
...
The sink only has "add" and "close" methods. It is the supertype of both EventSink and ChunkedConversionSink.
Made startChunkedConversion take Sink as argument, but still return ChunkedConversionSink. The more specialized chunked conversion sinks are test for, just as they always were.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//203603008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34157 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 10:13:01 +00:00
danrubel@google.com
18618a20b3
add sdkPath and enable tests
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//196993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33600 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 19:18:14 +00:00
jwren@google.com
84de116968
Nit change in the Dart command line analyzer and analysis server.
...
Logger.logError takes a String, not Error types. This will enable the exception to be printed, instead of the message '<SomeError> is not a String'.
Also, in the command line version of the dart analyzer, I put in a commented out stdout/stderr logger for developers.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//196373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33587 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 16:30:23 +00:00
brianwilkerson@google.com
3a86b9fd59
Fix the build
...
Review URL: https://codereview.chromium.org//191003003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33454 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 21:00:39 +00:00
brianwilkerson@google.com
e0b6dbb3b6
Add back previously removed tests
...
R=danrubel@google.com
Review URL: https://codereview.chromium.org//191103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33451 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 20:40:52 +00:00
danrubel@google.com
9e21e89d95
gracefully degrade with response to client if fail to access client specified dart sdk
...
+ return response if client specifies inaccessible sdk
+ cleanup JSON encode/decode references
+ cleanup channel close processing
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//187603010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33355 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 23:30:45 +00:00
danrubel@google.com
dc1d6bcacf
guard against invalid request id / method
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//180743020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33337 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 18:40:29 +00:00
danrubel@google.com
2231a169fd
restructure client api to use streams
...
+ restructure client api to use streams for notifications and responses
+ client waits for server shutdown response
+ cleanup channel tests
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//185313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33330 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 15:41:08 +00:00
danrubel@google.com
dbb20f6746
split client and server channels
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//182903005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33131 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 20:23:37 +00:00
danrubel@google.com
c1c75d48ae
update client to use channel rather than socket
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//176873015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33080 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 20:11:00 +00:00
danrubel@google.com
ee9f48440f
Error handling and code cleanup
...
+ cleanup futures code and error handling
+ send message to request server shutdown
+ normalize strings to match codebase
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//180253005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33063 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 14:39:40 +00:00
danrubel@google.com
ecdbe3b6ab
Analysis server connect fixes
...
+ new option for connecting to already running analysis server
+ gracefully handle unknown arguments
+ fix bugs in analysis server websocket connect
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//175183008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32974 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 17:41:22 +00:00
danrubel@google.com
a633f22d76
first cut cmdline analysis server launcher
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//175173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32903 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 15:54:21 +00:00
brianwilkerson@google.com
66590d7363
Use Future for error handling. This appears to be the recommended way of doing things because it is safer.
...
R=devoncarew@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//166703004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32748 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 17:20:14 +00:00
brianwilkerson@google.com
238ca64ce9
Server code clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//139983004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32466 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-08 15:25:37 +00:00
brianwilkerson@google.com
a9a2021517
Fix test failures
...
Review URL: https://codereview.chromium.org//152893004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32372 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 18:01:32 +00:00
brianwilkerson@google.com
e28a252941
Add structured error support
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//138833010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32366 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 17:11:39 +00:00
brianwilkerson@google.com
d5c3a07611
Add top-level server
...
R=danrubel@google.com , devoncarew@google.com
Review URL: https://codereview.chromium.org//138163006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32008 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-25 18:46:04 +00:00
brianwilkerson@google.com
93ce7745ca
Fix the build
...
Review URL: https://codereview.chromium.org//145973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31983 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-23 19:51:08 +00:00
brianwilkerson@google.com
8a0bf15dcf
Add server and request handlers
...
Review URL: https://codereview.chromium.org//137703010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31982 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-23 18:50:26 +00:00
brianwilkerson@google.com
fe37bca654
Basic communication protocol for server
...
R=devoncarew@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//137853026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31951 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-21 03:20:52 +00:00
brianwilkerson@google.com
5388d0ce8b
Logging support for server
...
R=devoncarew@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//136333008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31926 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-17 16:52:25 +00:00