danrubel
38cec67d03
step toward new completion API
...
- separate new CompletionContributor and DartCompletionContributor APIs
- revise new APIs and implementations to be Futures based
- revise InheritedContributor to use new Futures based contributor API
- remove unused classes
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1467023002 .
2015-11-23 12:50:12 -05:00
Konstantin Shcheglov
1e05c35650
Issue 25021. Fix for adding new required parameters when optional exist.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25021
Review URL: https://codereview.chromium.org/1468913004 .
2015-11-23 09:21:11 -08:00
danrubel
b091bb0b18
general completion contributor cleanup
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1465013002 .
2015-11-23 11:03:01 -05:00
Konstantin Shcheglov
53e9cce24d
Quick assist for converting block documentation comments into line ones.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1470753002 .
2015-11-22 19:57:03 -08:00
Konstantin Shcheglov
8c324a5b8d
Propagate types of final/const top-level variables and fields.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23001
Review URL: https://codereview.chromium.org/1460213005 .
2015-11-21 09:40:37 -08:00
danrubel
11f9386857
add compiltion unit accessor to completion target
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1457873007 .
2015-11-21 10:07:07 -05:00
Konstantin Shcheglov
bb1914e175
Make FixContributor asynchronous.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1461313004 .
2015-11-20 14:57:00 -08:00
pq
c0466f28f5
Rolling average work queue diagnostic ( #24933 ).
...
Background: https://github.com/dart-lang/sdk/issues/24933
Salient bits:
* sampling will only start if a client registers interest in diagnostics.
* sampling will stop if clients stop requesting diagnostics.
* sample results are coming back as a string (but a double would be better).
* the mapping of context folders to averages in not garbage collected; since it's only potentially leaking `_Average` objects (and not contexts) when folders are deleted, I think that's fairly benign.
BUG=24933
R=brianwilkerson@google.com , devoncarew@google.com
Review URL: https://codereview.chromium.org/1463923003 .
2015-11-20 14:24:47 -08:00
Brian Wilkerson
4ae8540383
Revert "Clean-up the registration of plugins"
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1465983004 .
2015-11-20 14:04:53 -08:00
Konstantin Shcheglov
ae1bee3859
Make AssistContributor asynchronous.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1461343002 .
2015-11-20 12:18:26 -08:00
Brian Wilkerson
1367d2d47d
Clean-up the registration of plugins
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1460123002 .
2015-11-20 08:14:14 -08:00
Konstantin Shcheglov
2b59830f49
Convert into block documentation comment assist.
...
I found out that I don't like the /// style.
So, I'm going to convert the Angular2 analysis plugins to the block style.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1466623002 .
2015-11-20 08:11:28 -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
pq
3972dd5e6b
Missed import.
...
Build fix: http://build.chromium.org/p/client.dart/builders/analyzer_experimental-linux-release-be/builds/4658/steps/tests%20/logs/stdio
Review URL: https://codereview.chromium.org/1460843003 .
2015-11-18 17:22:51 -08:00
pq
3a1a3ee094
Embedded options discovery ( #24943 ).
...
Merges analysis options extracted from `_embedder.yaml` files (potentially) with local overrides.
Background: https://github.com/dart-lang/sdk/issues/24943
For test coverage of merging, see: `analyzer/test/src/util/yaml_test.dart`.
BUG=24943
R=brianwilkerson@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1445363002 .
2015-11-18 16:41:27 -08:00
Konstantin Shcheglov
b46dd600d0
Remove unused declarations - skip summaries and completion.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1462463004 .
2015-11-18 15:21:01 -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
4ed3afeb5e
Fix for mapping SDK files to 'dart:' URIs.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24873
Review URL: https://codereview.chromium.org/1457643002 .
2015-11-17 17:20:15 -08:00
danrubel
6a5ac59b9c
process sorter analysis request(s)
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1449333002 .
2015-11-17 10:38:41 -08:00
danrubel
eee07a4815
update completion sorter to new API
...
first step updating to the new completion API
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1447503002 .
2015-11-16 23:01:43 -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
John McCutchan
bb4d547a5d
Add _embedder.yaml support to analyzer and analysis_server
...
- If a package has an '_embedder.yaml' file with an 'embedder_libs' key two things happen:
1) We do not use the DartUriResolver to resolve dart: libraries.
2) We use the EmbedderUriResolver to resolve all dart: libraries
- If multiple packages have an '_embedder.yaml' file we merge them.
- This might not be the final behaviour that we want but I'm not sure how to surface errors to the end user.
- The '_embedder.yaml' file has a top level key 'embedder_libs' which is a map from dart: library uri to source path. Other keys are ignored by the EmbedderUriResolver.
- Unit tests for analyzer
- Integration test for analysis_server.
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1437893003 .
2015-11-16 15:30:17 -08:00
pq
6d9cb5e48a
Move diagnostics to diagnostics domain ( #24931 ).
...
Still flagged `experimental` so no docs created.
See: https://github.com/dart-lang/sdk/issues/24931
BUG=24931
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1453433002 .
2015-11-16 14:10:10 -08:00
Konstantin Shcheglov
c295410852
If analysis is already complete, don't start it again in onFileAnalysisComplete().
...
This should fix the first two problems you found yesterday in the IDEA / DAS log - start/stop analysis on analysis.getErrors and as a consequence an extra analysis.implemented notification.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1451893002 .
2015-11-16 14:00:51 -08:00
Konstantin Shcheglov
9b7e011920
Optimize 'isWithin'.
...
Its "in stack" percent is down from 2.82% to 0.16% now.
This makes total MDL project analysis about 3% faster.
Also exchange the 'suffix' arguments to make them consistent with the parent/child order everywhere else.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1444983002 .
2015-11-16 08:45:27 -08:00
Konstantin Shcheglov
508b70bdab
Replace Glob implementation.
...
This makes MDL analysis another 5% faster.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1452473002 .
2015-11-15 12:17:17 -08:00
Konstantin Shcheglov
f464e2eddb
Use AbsolutePathContext in Folder.contains().
...
This makes MDL analysis about 5% faster, from 5900 samples to 5600 samples.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1444943003 .
2015-11-15 09:33:16 -08:00
Konstantin Shcheglov
b45f941d1e
Optimize work with absolute paths.
...
This significantly improves MDL project analysis time.
Cold VM: 24600 ms -> 21586 ms, about 14% faster.
Hot VM: 13100 ms -> 10080 ms, about 30% faster.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1443173004 .
2015-11-14 14:40:47 -08:00
Konstantin Shcheglov
610401a8d5
Fix for the watcher leak.
...
We need not just to cancel the subscription, but also to remove it from the map.
It's not so bad now for the MDL project, but any similar project will use a lot
of memory even after closign the project. This may be the reason of one of
the issues opened against DAS.
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/24613
Review URL: https://codereview.chromium.org/1447603004 .
2015-11-13 18:23:58 -08:00
pq
a8ef8cf84e
Fix to suppress (redundant) parse error reporting.
...
Background: https://github.com/dart-lang/sdk/issues/24911
BUG=24911
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1439403002 .
2015-11-13 10:25:29 -08:00
pq
eac5a0eb15
Status page indicator for contexts w/o .packages.
...
For diagnostic purposes.
See: https://github.com/dart-lang/sdk/issues/24900 for more context.
BUG=24900
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1436343002 .
2015-11-12 14:49:40 -08:00
pq
92fdffbf29
Revert package logging (moving to status pages).
...
Context:
https://github.com/dart-lang/sdk/issues/24900
BUG=24900
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1441673003 .
2015-11-12 13:58:47 -08:00
pq
4680736a8f
Server notification to indicate pub list-dir fallback.
...
For diagnostic purposes.
See: https://github.com/dart-lang/sdk/issues/24900 for more context.
BUG=24900
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1438293002 .
2015-11-12 13:24:25 -08:00
pq
60e04f734a
Static warning fixes.
...
The good news is that I reproduced a server issue; the bad news is I landed a change with unnoticed static warnings! :/
(This fixes them.)
BUG=
Review URL: https://codereview.chromium.org/1441763002 .
2015-11-12 10:22:20 -08:00
pq
b0a08827aa
Improves options validation type safety ( #24885 ).
...
Fixes #24885 .
https://github.com/dart-lang/sdk/issues/24885
BUG=24885
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1437703003 .
2015-11-12 09:44:25 -08:00
Konstantin Shcheglov
5b61845221
Send any logError() information to the IDE.
...
I have not seen any errors sent so far after several minutes of playing with it.
Adding and removing files does not cause any errors.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1432423004 .
2015-11-12 08:16:24 -08:00
Brian Wilkerson
e1c39602ba
Guard against null pointer exception in status page generation
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1440693004 .
2015-11-11 14:54:57 -08:00
Konstantin Shcheglov
02fe5bcd5a
Exclude 'doc' folders.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1439723002 .
2015-11-11 13:10:35 -08:00
Konstantin Shcheglov
0e712ea00c
Remove task inputs performance statistics.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1432293002 .
2015-11-11 10:04:17 -08:00
Konstantin Shcheglov
e4fae0658d
Tweaks for the status page.
...
1. We need to escape Element toString().
2. Wrap separate lists into <li>.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1416603008 .
2015-11-06 12:47:44 -08:00
Konstantin Shcheglov
a19b2985dc
Fix for the case when a class appears twice in a type hierarchy.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1406403009 .
2015-11-06 11:14:30 -08:00
pq
82e83bb34d
Experimental getDiagnostics request ( #24480 ).
...
* Adds `getDiagnostics` request with *very* provisional diagnostics payload (primary goal here is to plumb this fully through and iterate).
* Updates codegenerator to skip doc generation for experimental APIs.
Additional context here: https://github.com/dart-lang/sdk/issues/24480 .
BUG=24480
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1416093007 .
2015-11-05 15:05:21 -08:00
Konstantin Shcheglov
61ee6dff5f
Roll instrumentation log files.
...
Keep up to 5 old log files.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1418143006 .
2015-11-05 08:40:43 -08:00
Konstantin Shcheglov
d49d0f7e06
Wait for InstrumentationService.shutdown() before exit(0).
...
Otherwise we don't get the last portion of instrumentation data in the
file at all.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1413403007 .
2015-11-04 10:08:20 -08:00
pq
9e9b7c0aaf
Add Server PID to Server Status page.
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1415573012 .
2015-11-04 09:25:42 -08:00
Brian Wilkerson
aaaf7c2de8
Fix glob patterns to work on Windows
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1426353002 .
2015-11-03 15:35:26 -08:00
Konstantin Shcheglov
f49612ba51
Covering expression offsets/lengths integration.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1411973006 .
2015-11-03 10:45:17 -08:00
Konstantin Shcheglov
069ba985de
Fix protocol for EXTRACT_LOCAL_VARIABLE and coveringExpressionOffsets/lengths.
...
Unfortunately we have to make coveringExpressionOffsets and coveringExpressionLengths optional.
Otherwise new clients cannot correctly parse responses from old servers.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1407333006 .
2015-11-03 10:19:41 -08:00
Brian Wilkerson
879cf82b6b
Rework analyzed files support to use globs
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1413643006 .
2015-11-03 07:11:29 -08:00
Konstantin Shcheglov
128250a9ea
Compute covering offsets/lengths.
...
Drop support for binary expressions fragments.
Reduce number of reported problems, provide best guess results instead.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1431673003 .
2015-11-02 18:22:12 -08:00