Commit Graph

4090 Commits

Author SHA1 Message Date
Konstantin Shcheglov c43f292dd9 Remove IMPORT_EXPORT_SOURCE_CLOSURE and IS_CLIENT results.
This improves warm VM analysis time (i.e. 99% of all analyzis that happens in IDEs) from 7200 ms to 6600 ms.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1417143003 .
2015-10-24 08:35:26 -07:00
pq df580cf0ea WorkItem detail diagnostics.
R=keertip@google.com

Review URL: https://codereview.chromium.org/1418323002 .
2015-10-23 14:48:24 -07:00
keertip c133bf9467 add work item info to context status page
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1415503006 .
2015-10-23 13:27:10 -07: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
danrubel 33e6b737e8 enable analysis server cmdline instrumentation log file option
this change allows instrumentation to be logged to a file that is specified on the command line when analysis server is started for both internal and external builds of the analysis server

R=lukechurch@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1413563009 .
2015-10-23 15:47:09 -04:00
danrubel 5bd191ee12 fix import uri completion exception - fixes #24709
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1418123004 .
2015-10-23 14:55:20 -04:00
pq d12abed5d7 Last performed task diagnostics.
Adds a new block of status that reports the last 10 performed tasks.

For example:

<p>Recent Tasks</p>
GatherUsedLocalElementsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

GatherUsedImportedElementsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

GenerateHintsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

GenerateLintsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

VerifyUnitTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

LibraryUnitErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

DartErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

LibraryErrorsReadyTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart

GetContentTask for source /Users/pquitslund/src/git/clones/analyzer_cli/.analysis_options

GenerateOptionsErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/.analysis_options

R=brianwilkerson@google.com, keertip@google.com

Review URL: https://codereview.chromium.org/1420783004 .
2015-10-23 10:31:26 -07:00
Konstantin Shcheglov 07acac8b8e Compute and display tasks input timings.
It's not perfectly useful - it computes just cumulative timings.
So, it includes not just time for extracting and gathering inputs, but also actual time to compute them.
But it is still useful to compare between runs after changes to tasks inputs, because computing time
should be the same, so the difference is this extracting/gathering time.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1406983007 .
2015-10-23 09:38:24 -07:00
danrubel f45c8bc917 add logging code to track unexpected situation - fixes #24630
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1412423006 .
2015-10-22 13:06:58 -04:00
danrubel 6726ac5ccd fix completion exception - fixes #24630
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1418093003 .
2015-10-22 10:14:02 -04:00
Konstantin Shcheglov 4e5938f373 Completion exceptions are never fatal.
Actually only some methods of the 'edit' domain are potentially fatal.

Alternative solutions:

1. Don't make anything fatal.

2. Add areExceptionsFatal to RequestHandler.

3. Let every domain to decide whether exceptions in some method or none of them are fatal.

R=brianwilkerson@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org/1404353007 .
2015-10-21 20:26:46 -07:00
pq afa746230f Lint option change propagation test.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1417963004 .
2015-10-21 15:22:13 -07:00
Konstantin Shcheglov f18a0209fb Fix for 'Assign to Local Variable' in closures.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1415253002 .
2015-10-21 13:20:22 -07:00
pq 6c85fe785a Analysis Options error notifications.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1411013003 .
2015-10-21 09:59:19 -07:00
pq bf0ba96027 Analysis Options processing task and manager.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1413973003 .
2015-10-20 15:38:55 -07:00
Konstantin Shcheglov c7907e7800 Support for searching files by import/export/part URIs and library identifiers.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1417483006 .
2015-10-20 08:52:02 -07:00
keertip 2a88bdac4a refactor timing tests to not use the test framework
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1419503002 .
2015-10-19 16:34:56 -07:00
Konstantin Shcheglov 5f71b2e7cd Check that AnalysisContext is not null.
I guess this happens when a "resolved" CompilationUnit is not actially resolved.
I don't know why we get such units, but I saw this situation twice in IDEA.
So, probably we need to fix at least throwing NPE here.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1418513002 .
2015-10-19 13:27:50 -07:00
Konstantin Shcheglov 5e9ea82aa4 Issue 24612. Skip excluded folder during contexts creation.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24612

Review URL: https://codereview.chromium.org/1411393003 .
2015-10-19 13:17:11 -07:00
Konstantin Shcheglov d5830fb6a3 Publish analyzer and use it to fix completion in 'for (Type item in^)'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1417613002 .
2015-10-19 12:36:16 -07:00
Konstantin Shcheglov ea947094ae Fix for suggesting methods as a *name* of a local variable declaration.
R=brianwilkerson@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org/1417603002 .
2015-10-19 12:29:22 -07:00
Konstantin Shcheglov efc1d4b224 Ignore contexts in folders named 'packages' or starting with dot.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24614

Review URL: https://codereview.chromium.org/1415713002 .
2015-10-19 11:59:11 -07:00
Konstantin Shcheglov e0636b183c Make IndexableObjectKind parameterized.
LMK if this is a bad change.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1413563004 .
2015-10-19 10:13:43 -07:00
Konstantin Shcheglov f80bd4203d Index Dart CompilationUnit(s) with the correct context.
We should use the context that they belong to, not the context that we got them through.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1410983003 .
2015-10-19 09:59:58 -07:00
pq 140a4f5891 Register .analysis_options files for analysis.
Some oportunistic constant cleanup as well (follow-up from: https://codereview.chromium.org/1399893004/).

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1412213003 .
2015-10-19 09:46:54 -07:00
danrubel 948b21a8cf (TBR) update test to run with new task model
Review URL: https://codereview.chromium.org/1413963002 .
2015-10-19 12:04:51 -04:00
Brian Wilkerson 27eb09033f Clean up wording of client usage expectations
R=paulberry@google.com

Review URL: https://codereview.chromium.org/1409353002 .
2015-10-19 07:46:49 -07:00
Brian Wilkerson 8eb408914d Fix library name
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1411523007 .
2015-10-19 07:46:32 -07:00
Konstantin Shcheglov 3b198ed6ae Disable completion of formal parameter names as *types*.
R=brianwilkerson@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org/1414653002 .
2015-10-18 13:28:12 -07:00
Konstantin Shcheglov af4fbdd952 Index library/part file references from import/export/part containing files.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1407863004 .
2015-10-18 10:24:53 -07:00
Konstantin Shcheglov c0d68a5437 DAS specification changes - spelling and ElementKind.FILE addition.
ElementKind.FILE will be used in search.findElementReferences

1. In the 'element' field of responce when a URI is at the given offset.

2. In the only element of the 'path' field of SearchResult(s) for URI references to a URI or a library identifier.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1409333002 .
2015-10-17 10:03:03 -07:00
Konstantin Shcheglov 67576340b0 Declare IndexableObject.file instead of Source.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1409203002 .
2015-10-16 14:43:49 -07:00
Brian Wilkerson adb8ebd0e6 Remove obsolete flag to enable package support
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1411833002 .
2015-10-16 13:43:00 -07:00
Brian Wilkerson 3825cf0cd4 Add an experimental domain
R=paulberry@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org/1412683002 .
2015-10-16 12:56:13 -07:00
Konstantin Shcheglov 381d3ac549 Require SDK >= 1.12 to start using '?.' syntax.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1412773002 .
2015-10-16 12:45:03 -07:00
Konstantin Shcheglov ce6614f2dc Disable completion in comment text.
It drives me nuts when I try to type some text and IDEA replaces my words with some random identifies.

R=brianwilkerson@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org/1410893002 .
2015-10-16 10:38:47 -07:00
Konstantin Shcheglov 18a29ba8a8 Tweak for make test passing with useTaskModel = true.
A real fix after final actual switching.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1410493005 .
2015-10-16 08:29:35 -07:00
pq 91e5facc0f Registry memory leak fixes.
Fixes #24549.

A few notes:
  * does away with registry in favor of context-associated configurations
  * pulls in linter rev that does the context association
  * bumps analyzer version before publishing (needed to update analyzer_cli)

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1406043002 .
2015-10-15 14:24:20 -07:00
Konstantin Shcheglov a30bcd7b97 Issue 24599. Fix for requesting navigation for directives.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24599

Review URL: https://codereview.chromium.org/1405033002 .
2015-10-15 10:54:06 -07:00
pq 0cd0c886a1 Use new task model in completion tests.
Review URL: https://codereview.chromium.org/1401403006 .
2015-10-14 22:29:53 -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
pq cae05d6bd4 Context invalidation on option changes (Implements #24574).
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1399893004 .
2015-10-14 20:42:50 -07:00
pq 6bce9b2373 One extension manager (to bind them all).
TL;DR Moves all plugin registration to AE's extension manager.

The rub is that plugin registration wasn't happening right which cropped up in integration testing.  Included is a test that verifies that options are getting properly threaded through to the linter.  (This test failed when we had two Extension Managers.)

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1398033004 .
2015-10-13 16:37:42 -07:00
pq e5f3bb163b AS strong-mode .analysis_options awareness.
R=brianwilkerson@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1403983002 .
2015-10-13 13:22:49 -07:00
Leaf Petersen 4ca8a3f19b Strong mode checker integration. This integrates jmesserly's CL, and adds a task for computing strong mode errors and an annotated unit.
BUG=
R=brianwilkerson@google.com, jmesserly@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1396273004 .
2015-10-13 10:16:35 -07:00
Konstantin Shcheglov 9913f33522 Stop looking for overrides once the pivot element reached.
See also https://github.com/dart-lang/sdk/issues/21804 for the original motivation.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1396053003 .
2015-10-13 08:24:16 -07:00
Konstantin Shcheglov 586a1f359a Fix for renaming (an invalid) ClassElement invocation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1385403007 .
2015-10-12 12:21:12 -07:00
Konstantin Shcheglov 2bbb40d0e2 Warn about conflict before renamed class member and enclosing class name.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1398213004 .
2015-10-12 12:10:12 -07:00
Konstantin Shcheglov 307438d582 Return 'null' rename refactoring in case of a null element.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1397403002 .
2015-10-12 10:44:31 -07:00