scheglov@google.com
304243bc5b
Add ServerOperation and queue.
...
Schedule operations to perform analysis.
Moving notifications into operations to be done in the next CL.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//308003009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36890 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 18:31:49 +00:00
brianwilkerson@google.com
ae5597140c
First cut at server timing tests
...
R=jwren@google.com , paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//303233007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36874 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 14:39:33 +00:00
scheglov@google.com
a95856f5be
Use 'analysis.setSubscriptions' HIGHLIGHTS in Editor.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//304273007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36853 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-31 01:53:28 +00:00
scheglov@google.com
fe26a39b8d
Initial implementation for 'analysis.setSubscriptions' API.
...
Not quite all, and not as operations yet.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//308923003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36834 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 21:02:28 +00:00
paulberry@google.com
386fcb77c9
Don't add files inside "packages" subdir to context.
...
In the short term this will allow us to make fair comparisons between
the Java-based and Dart-based analysis engines. In the long run we'll
be adding these files to the context using a separate mechanism (by
finding them via "pub list-package-dirs").
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//303413003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36832 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 19:38:20 +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
scheglov@google.com
2ee78ad191
Implementation of 'notification.highlight' API.
...
Still no subscriptions yet, so we generate highlight regions for all non-SDK files.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//307963006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36822 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 17:22:05 +00:00
scheglov@google.com
125d09e37d
Computers and services snapshot.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//304323004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36808 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-29 22:19:21 +00:00
paulberry@google.com
7b9959065e
Change RequestDatum "is" functions into getters.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//309483006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36807 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-29 22:18:11 +00:00
paulberry@google.com
a9a6747471
Handle file additions/removals in ContextDirectoryManager.
...
R=danrubel@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//308713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36800 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-29 20:14:24 +00:00
paulberry@google.com
180f3b56a6
Rename PubFolder and update comments.
...
Since it is no longer always associated with a pubspec.yaml file,
PubFolder is a misleading name.
R=danrubel@google.com
Review URL: https://codereview.chromium.org//304923003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36788 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-29 16:05:25 +00:00
paulberry@google.com
f8e69ee59c
Make ContextDirectoryManager responsible for scanning directory contents.
...
It will be responsible for updating the context when the contents of
the directory have changed, so it makes sense to have it do the
initial scan as well.
R=danrubel@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//306733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36785 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-29 15:26:13 +00:00
paulberry@google.com
3c32eb2434
Create a new class for managing the set of analysis roots.
...
This will allow the functionality of mapping analysis roots to context
folders to be tested in isolation.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//305763002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36768 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 20:50:48 +00:00
scheglov@google.com
e1ecc28e7f
Implementation for 'analysis.updateContent' API.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//300553014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36766 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 20:44:32 +00:00
paulberry@google.com
b4debf3d44
Add watch and modify/delete support to MemoryFile.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//297303010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36762 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 20:15:58 +00:00
scheglov@google.com
35c177c90b
Send 'notification.errors' for all non-SDK files.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//307533004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36743 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 15:50:23 +00:00
danrubel@google.com
e7e559942c
add server.status notification
...
BUG=
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//298823007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36727 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 02:25:20 +00:00
scheglov@google.com
ae2bee4403
Fix analyzer warning.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//305643003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36721 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 23:48:38 +00:00
paulberry@google.com
a9c1109b69
Allow physical folder resources to be watched for changes to their contents.
...
This functionality is just a thin wrapper over the existing Watcher
package. A future CL will add similar functionality to in-memory
folder resources.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//303503007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36714 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 22:36:20 +00:00
scheglov@google.com
89fd27a218
Tests for exceptional situations in MemoryResourceProvider.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//300853006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36713 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 22:17:48 +00:00
scheglov@google.com
764c6b112c
Partial implementation of the 'setAnalysisRoots' API.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//300023004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36702 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 19:01:14 +00:00
scheglov@google.com
73384dcbed
Use Posix style for memory resources.
...
R=brianwilkerson@google.com , ricow@google.com
BUG=
Review URL: https://codereview.chromium.org//300043009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36700 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 18:25:31 +00:00
scheglov@google.com
a37f04c568
Resource/File/Folder interfaces and implementations for dart:io and memory.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//299403004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36613 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-25 16:17:19 +00:00
scheglov@google.com
cb0999996d
API and stubs for the 'analysis' domain.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//302503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36611 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-25 15:22:36 +00:00
scheglov@google.com
170020b4f8
Use type annotations everywhere in analysis_server/lib.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//300643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36610 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-24 17:46:27 +00:00
scheglov@google.com
ebd41ed304
Implementation of 'Server Domain' in dart analysis server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//297153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36607 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-24 17:36:06 +00:00
scheglov@google.com
fbae744eaa
Fix warnings in get_handler.dart
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//297123003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36596 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 22:59:33 +00:00
danrubel@google.com
6da2ff1d40
improve analysis server notifications
...
* add context id to error notifications
* add analysis.complete notification
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//299513003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36363 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-20 16:42:50 +00:00
danrubel@google.com
f21f056bba
implement ByteStreamClientChannel close
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//284353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36316 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-19 19:35:01 +00:00
danrubel@google.com
88344402e1
move context id constant to AnalysisServer
...
BUG=
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//284103005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36263 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-16 17:44:24 +00:00
paulberry@google.com
206854b25e
Fix remaining RequestDatum tests.
...
There were a few problems:
- An expression like "x is List<Foo>" doesn't guarantee that every
element of x is of type Foo. We need to check item by item.
Similar for maps.
- InvalidParameterResponseMatcher was failing to account for the fact
that the response gets wrapped in a RequestFailure object.
- Tests weren't calling setUp().
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//289003003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36237 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-15 20:03:53 +00:00
danrubel@google.com
03aaf34742
add RequestDatum tests and fix some situations
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//281373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36217 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-15 11:55:26 +00:00
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
6a50f6f490
Make the http portion of the analysis server optional.
...
If no "--port" option is supplied, the analysis server won't start up
an http server, and it will only communicate with the client over
stdio.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//239333006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35129 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 20:03:25 +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
d136370b7c
Remove "listening on port $port" message.
...
This prevents it from interfering with stdio-based communication
between the editor and analysis server.
R=brianwilkerson@google.com , jwren@google.com
Review URL: https://codereview.chromium.org//236063019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35107 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 14:55:07 +00:00
paulberry@google.com
d30a35bd5a
Allow the analysis server to connect to the client over stdio.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//236133013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35095 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-15 22:52:56 +00:00