Commit Graph

120 Commits

Author SHA1 Message Date
Konstantin Shcheglov d0b28d2040 Fix analysis_server tests on Windows.
R=brianwilkerson@google.com

Change-Id: I9e66a81a8aab249ce4174085e2432e4ed53d943d
Reviewed-on: https://dart-review.googlesource.com/58142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-02 21:40:16 +00:00
Konstantin Shcheglov 184df3aee0 Make AnalysisServer.getAnalysisResult() sync to avoid changing behavior between Dart1 and Dart2.
R=brianwilkerson@google.com

Change-Id: I35e01907a6e8286b5ffd48a3b5ac6fcaf23034b3
Reviewed-on: https://dart-review.googlesource.com/58000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-06-01 21:17:33 +00:00
Danny Tuppeny 40e3f9addc Convert paths for mock SDK libraries to fix tests on Windows
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 #32230
https://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>
2018-02-20 18:55:38 +00:00
Paul Berry 105b170ddb Roll package test to 0.12.29+1 and stack_trace to 1.9.0
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>
2018-01-07 14:22:23 +00:00
Brian Wilkerson 98e0c26a89 Convert several test classes to use ResourceProviderMixin
Change-Id: I1c85c6f29ae74cca0b594fc1f9ddae098b815e72
Reviewed-on: https://dart-review.googlesource.com/31860
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-01 16:21:02 +00:00
Brian Wilkerson e4d44b2dcd Remove more references to the old plugin system
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004523003 .
2017-08-23 09:25:07 -07: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
Konstantin Shcheglov 00d5012906 Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt.
...instead of mixing formatting with actual changes in many CLs.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2975253002 .
2017-07-13 16:28:18 -07:00
Konstantin Shcheglov 911263f240 Remove the old index.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963773003 .
2017-06-28 13:44:05 -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 55d735911b Remove the unused operations queue
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2957643002 .
2017-06-23 09:04:13 -07:00
Brian Wilkerson d30c5070a2 Disable a test to fix the bots (TBR)
Review-Url: https://codereview.chromium.org/2946763002 .
2017-06-19 12:02:52 -07:00
Brian Wilkerson e0216fef7f Remove ability to disable new analysis driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2937323003 .
2017-06-19 08:13:14 -07:00
Brian Wilkerson fb982f5476 Make server use the common protocol classes
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2879273002 .
2017-05-15 09:35:46 -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
Brian Wilkerson a01afcd1d1 Remove the options plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
Brian Wilkerson e17e359faa Create summary files in MockSdk classes
Review URL: https://codereview.chromium.org/2542853003 .
2016-12-02 07:32:39 -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 685e4ff9e1 Revert "Remove unused option in server API"
Review URL: https://codereview.chromium.org/2382033003 .
2016-09-30 10:14:12 -07:00
Brian Wilkerson 2972bd0d6b Remove unused option in server API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2382053002 .
2016-09-30 09:04:38 -07:00
Brian Wilkerson 6c448b6938 Move exception support to its own library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2328043002 .
2016-09-10 11:04:19 -07:00
Konstantin Shcheglov 7442a85cbb Issue 27130. Fix applying changes to .analysis_options on save.
This fix partially reverts changes made in https://github.com/dart-lang/sdk/commit/de6925a23ebf29cd587dd5f4e214cb277a7397e4
It is correct that we should ignore applyChanges() for sources with
content overridden in the content cache. But we cannot know what else
happened with results in the analysis cache at this point. So, we
should just let Analysis Server to always run analysis, so that
Driver and WorkManager(s) will decide if there is anything to do.

I believe that the original motivation for the change was to avoid
sending extr 'analysis.implemented' notifications. It does not happen
anymore, probably because we set other shortcuts using source content.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27130

Review URL: https://codereview.chromium.org/2314933003 .
2016-09-06 13:41:48 -07:00
Brian Wilkerson 6ccbef94fc Convert analysis server over to use ContextBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2286923002 .
2016-08-29 08:11:53 -07:00
Brian Wilkerson b86a021155 Remove changes that were accidentally entangled with an earlier CL (TBD)
Review URL: https://codereview.chromium.org/2266763002 .
2016-08-21 16:10:08 -07:00
Brian Wilkerson 79f190cf69 Supress deprecation warnings in a deprecated library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2261053002 .
2016-08-21 15:47:38 -07:00
Konstantin Shcheglov ed887c09d1 Validate cache consistency asynchronously. Compute modification times of physical files in a separate isolate.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2132073003 .
2016-07-08 15:01:05 -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
Florian Schneider 705e9e781d Fix more flakiness in pkg tests.
I already fixed similar failures.

I recommend eliminating all uses of pumpEventQueue.

BUG=#26556
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2059503002 .
2016-06-09 15:08:06 -07:00
Florian Schneider 2a6847de41 Make some pkg tests less timing-dependent.
Testing should not depend on how long it takes to get a response from the
analysis server.

Depending on how long an analysis step takes, these tests will randomly fail
e.g. when run in -mdebug mode, or with other VM flags that change (i.e. slow-down)
timing (--trace-compiler, --optimization-counter-threshold=5"

There are probably more problematic places like this. I just fixed the ones that
I saw failing when running with --optimization-counter-threshold=5.

BUG=#26556
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2016993004 .
2016-05-30 12:14:16 +02:00
Brian Wilkerson 44836f8538 Support the name analysis_options.yaml for analysis options files
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1975963002 .
2016-05-13 07:33:06 -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
Konstantin Shcheglov bd76934452 Remove old index and search implementations.
Also rename the new implementation files and classes to remove the
'2' suffix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1801883002 .
2016-03-14 12:19:40 -07:00
Konstantin Shcheglov c9e82c7e67 Fill the new index in Analysis Server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1749333004 .
2016-03-02 14:00:17 -08:00
Brian Wilkerson 841f8e6cf2 Move shouldFileBeAnalyzed into ContextManager
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1748763002 .
2016-03-01 12:40:56 -08: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
danrubel e13a49fdfa (TBR) "fix" test_no_duplicate_notifications
Review URL: https://codereview.chromium.org/1542433002 .
2015-12-19 11:41:32 -05:00
Paul Berry de3a1b22c8 Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27 2015-12-07 07:04:07 -08:00
danrubel 79a8654e5f (TBR) increase pumpEventQueue to finish analysis
Review URL: https://codereview.chromium.org/1508523002 .
2015-12-06 17:26:27 -05:00
Brian Wilkerson 600fc17de1 Clean-up the registration of plugins
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -08:00
Brian Wilkerson b2728c15a6 Revert "Fix test failures on the bots"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1468623002 .
2015-11-20 14:04:11 -08:00
Brian Wilkerson 6b45d6544c Fix test failures on the bots
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1467623002 .
2015-11-20 11:48:35 -08:00
Konstantin Shcheglov a689bf4180 Report error for ignored priority file. Ignore subscription for ignored files.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1462693002 .
2015-11-18 17:31:58 -08:00
Konstantin Shcheglov abe8d87e0e Implement AnalysisServer.getContainingContext() using ContextManager.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1455163005 .
2015-11-18 14:10:35 -08:00
Konstantin Shcheglov de6925a23e Add ApplyChangesStatus to AnalysisContext.applyChanges() and use it in DAS.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1448173002 .
2015-11-16 19:42:15 -08:00
Konstantin Shcheglov 041e61a0f6 Ensure that RESOLVED_UNITx ready once for every library.
...instead of ensuring this separately for complete closures of every library.

This improves initial analysis performance from about 44 seconds to 39.
This also makes WorkOrder.moveNext less expensive - to about 5.6% during initial analysis.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1412273004 .
2015-10-23 13:25:56 -07:00
pq 9989687a25 Revert server test extension manager "fix".
BUG=

Review URL: https://codereview.chromium.org/1398043006 .
2015-10-14 22:10:47 -07:00
pq 3188a74994 More extension manager unification.
Addresses bot test failures: http://build.chromium.org/p/client.dart/builders/pkg-mac-be/builds/1531/steps/pkg%20%20tests%20failures/logs/stdio.

(See https://codereview.chromium.org/1398033004/ for background.)

Marking TBR in quest for build greenness.

Review URL: https://codereview.chromium.org/1401403005 .
2015-10-14 21:22:26 -07: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