The test times out, because we don't get any answer on our getNavigation().
Technically this happens because we dispose the corresponding instance
of AnalysisDriver, so it is removed from the AnalysisDriverScheduler,
and getResult() never completes.
Which, I think makes sense.
Once the analysis root is removed, the client cannot expect answers.
So, there is no need for the test.
R=brianwilkerson@google.com
Change-Id: I124ac3d6a4a903880c7b8f82cafe692b38c59017
Reviewed-on: https://dart-review.googlesource.com/57903
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>
This is needed for better highlighting optional new/const. I think the
main reason is that 'new' is highlighed and we knew that this is a
new instance creation. Constructors are also highlighed in the default
color scheme. But class names are not. So, to make code look colorful
again, we need to highlight class names in instance creations.
R=brianwilkerson@google.com, devoncarew@google.com
Change-Id: I8fde0b4aa5243e94d7ba575a74d52d31d3b665bb
Reviewed-on: https://dart-review.googlesource.com/42021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
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>
* Tweak comment that was based on integration test verison.
See #30285
* Include additional 1/2-line spans that end on same lines as >2 line spans.
See #30285
* Add tests to ensure no unwanted closing labels from multiline expressions.
See #30285
* Don't show closing labels for code inside interpolated strings.
See #30285
* Remove unwanted @soloTest.
See #30285
* Make casing of test names consistent.
See #30285
* Add a constructor and make fields final.
See #30285
* Use putIfAbsent for adding to map.
See #30285
* Shorten closing labels constructor.
See #30285
* Run "Sort members" on closing labels files.
See #30285
* Remove unnecessary type annotations.
See #30285
* Add empty closing labels computer/visitor and tests.
See #30285
* Add initial implementation and test for closing labels.
See #30285
* Add various tests for analyzer closing labels.
See #30285
* Fail tests if errors occur.
Without this the notifications will never come through and the test will time out. This causes them to fail right away on errors.
See #30285
* Add test and fix for crash that occurred during testing.
See #30285
* Remove unnecessary abs().
See #30285
* Remove question that has been answered (yes).
See #30285
* Remove unnecessary .argumentList on spansManyLines check.
See #30285
* Add test for prefixed import and constructor names.
The behaviour seems like what we want, though need to confirm if this is the best way to do it.
See #30285
* Add additional prefixed tests and another TODO.
See #30285
* Fix method invocations to show full target/name.
See #30285
* Fix constructor invocations to not use toString().
See #30285
* Convert most closing label tests to unit tests.
See #30285
With the new 'sendCachedToStream' option we can control that whether
cached analysis result is also reported into the 'results' stream when
it is desirable (when we do this to send analysis notifications from
the stream listener). Or not, when it is not desirable, e.g. when we
ask becaue we need the results unit for Quick Assists.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/30238
Review-Url: https://codereview.chromium.org/2989633002 .
In general case we cannot use getResult() in this notification.
We generate these notifications after analysis is complete in scheduler.
But if there is no cached result, getResult() will schedule analysis.
So, we might get into a loop.
In practice this worked, because IDEA always makes files priority,
so their results cached, and then subscribes for notifications.
But in general case we need this protection.
This also means that the 'implemented' notification works (and will
work) only for priority files.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2965533002 .