This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.
Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.
Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The other lines on this method are calling `provider.convertPath` around their paths but these ones do not, which is causing almost all analysis server tests to fail on Windows (for me - I can't explain them not
failing builds). This causes the hard-coded paths like `/lib/core/core.dart` to be fixed up to `C:\lib\core\core.dart` which is what the server is looking for (because at the other end the paths *have* been fixed up).
See #32226.
Closes#32230https://github.com/dart-lang/sdk/pull/32230
GitOrigin-RevId: 1adeee23f8ac8efc8acf61caf5f769e4ec44c030
Change-Id: Id9bf195967db0912c6f4b67bd79d504e627b8aab
Reviewed-on: https://dart-review.googlesource.com/42300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Previously, ContextManager had two API's: one used by analysis server
to tell the ContextManager what to do, and one used by the
ContextManager to make callbacks to analysis server in response to its
requests. The first API was implemented in the class
AbstractContextManager, which derived from ContextManager, and the
second API was implemented in ServerContextManager, which derived from
AbstractContextManager.
In addition to causing confusion, this made it impossible to provide
an alternate implementation of ContextManager as a plug-in, since the
plug in would have had to re-implement the second API, and that would
have required accessing private implementation details of the
ContextManager.
This CL separates the API's: the first API is specified in
ContextManager and implemented in ContextManagerImpl, and the second
API is specified in ContextManagerCallbacks and implemented in
ServerContextManagerCallbacks.
In the long run I hope to eliminate the ContextManagerCallbacks class
entirely, by having the ContextManager tell its client what to do
using return values rather than callbacks.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1243893002 .
Analysis.getError now has the following behaviors:
- If the file in question does not exist, or is not subject to
analysis, a new error called GET_ERRORS_INVALID_FILE is generated.
- If the server's internal state (the set of active analysis contexts)
changes while the query is in process, the query is transparently
restarted; the client no longer receives a GET_ERRORS_ERROR error.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//532403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39871 260f80e4-7a28-3924-810f-c04153c831b5
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
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