Devon Carew
4c5531315b
fix two test failures in analyzer_cli/test/options_test.dart
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/3003343002 .
2017-08-24 11:36:38 -07:00
Konstantin Shcheglov
776b7eb9cd
Cache PackageBundle instances in AnalyzerWorkerLoop and reuse for multiple requests.
...
There are many Bazel targets that have huge number of dependencies,
hundreds and thousands of them, and these dependencies are the same
as for other targets. So, we want to keep corresponding PackageBundle
instances, partially decoded, in memory and reuse.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/3006543002 .
2017-08-24 11:32:20 -07:00
Devon Carew
13346cab3d
Put the analytics UI behind a flag.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/3003783002 .
2017-08-24 11:17:37 -07:00
Konstantin Shcheglov
9475c47db1
Use single logger for AnalyzerWorkerLoop and BuildMode instances.
...
I might need to pass this instance into worker level caches, which we
will add to improve workers performance.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2994853002 .
2017-08-11 08:15:07 -07:00
Konstantin Shcheglov
5b29ae48ad
Don't record dependencies in SummaryDataStore.
...
It was added for DDC, but DDC does not use it anymore. At the same time,
URIs operations are expensive, and this code is showing in Observatory.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2996783002 .
2017-08-09 17:45:13 -07:00
Konstantin Shcheglov
0567e8cbd8
Decorate build mode with using PerformanceLog.
...
So, that we can redirect it into a file and see performance during
large internal builds with using workers.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2996773002 .
2017-08-09 13:50:49 -07:00
Konstantin Shcheglov
11b8c54e22
Switch build mode to Analysis Driver.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2994763002 .
2017-08-08 11:11:37 -07:00
Konstantin Shcheglov
ce4f0d40a3
Prepare all unlinked units before linking.
...
This change expects that build mode is always hermetic, i.e. the all
unlinked units that are used for linking are given us as inputs.
We need to separate computing unlinked units from linking, because
linking is synchronous, and access to unlinked units will becore
asynchronous when we switch to using Analysis Driver.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2994753002 .
2017-08-08 09:37:07 -07:00
Konstantin Shcheglov
6515a80b21
Make AnalyzerWorkerLoop AsyncWorkerLoop.
...
BuildMode will be switched to AnalysisDriver, so will become async.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2998603002 .
2017-08-08 08:11:06 -07:00
Paul Berry
89c910b9c1
Move byte_store.dart and file_byte_store.dart to their own subdirectory.
...
This allows us to use the subpackage relationships test to verify that
they don't import any other parts of front_end, which paves the way
for the possibility of moving them to their own package in the future.
R=scheglov@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2990323002 .
2017-08-07 11:04:48 -07:00
Erik Ernst
9336e199fd
Re-land of CL 2990703002, adding fixes to analyzer_test and error_test.
...
This CL is identical to the reverted CL 2990703002 which implements
syntactic support for generalized void in the analyzer, plus two bug
fixes in pkg/analyzer/test/generated/parser_test.dart and
pkg/analyzer_cli/test/error_test.dart. In the former, a test on parsing
`void,` was changed to expect an error: _isTypeIdentifier on a lone
`void` will no longer return true, which is necessary because `void`
can now be used as a type annotation alone. Another test on `void x`
was added, which produces the behavior previously seen for `void,`.
In error_test, the error which is used throughout was changed from
`void foo;` to `var int foo;` (because the former is no longer an
error).
Review-Url: https://codereview.chromium.org/2992623002 .
2017-07-27 12:39:19 +02:00
Konstantin Shcheglov
1db0b3a29c
Replace typed_mock with mockito in analyzer_cli.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2989583003 .
2017-07-25 09:54:08 -07:00
Leaf Petersen
1eb480d266
Add --no-declaration-casts option to analyzer.
...
Adds a flag to disable and enable declaration casts independently
from other casts.
Fixes #29546
BUG=
R=brianwilkerson@google.com , rnystrom@google.com
Review-Url: https://codereview.chromium.org/2976963002 .
2017-07-20 15:55:07 -07:00
Konstantin Shcheglov
0827191d87
Refactor creating AnalysisOptionsImpl and declared variables.
...
We need to separate declared variables from AnalysisContext because
we're going to replace AnalysisContext with AnalysisDriver.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2976683002 .
2017-07-11 11:29:35 -07:00
Konstantin Shcheglov
824a62ba3c
More tests for build mode.
...
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2971373002 .
2017-07-07 14:33:09 -07:00
Konstantin Shcheglov
671bedc8f6
Fix strong_mode_test after moving driver_test fields into class.
...
TBR
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2971343002 .
2017-07-07 10:01:47 -07:00
Konstantin Shcheglov
73ec7f0a79
Convert driver_test.dart to reflective tests.
...
It was hard to keep track of defined tests, and to run individual tests.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2976493002 .
2017-07-07 09:38:49 -07:00
Konstantin Shcheglov
711e37295a
Remove the --build-summary-only-diet option.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2968403002 .
2017-07-07 09:15:48 -07:00
Konstantin Shcheglov
0699a72344
Additional tests for build mode.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2968303002 .
2017-07-06 15:02:28 -07:00
Konstantin Shcheglov
956b9ce96b
Split driver_test main() into 4 tests methods.
...
This is not how I would ideally prefer to write tests, but a bit better.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2967413002 .
2017-07-06 14:12:45 -07:00
Devon Carew
a2e9519279
Make exception reporting best effort.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2965263002 .
2017-07-06 13:36:28 -07:00
Devon Carew
d4abd49df7
Add analytics to analyzer-cli and analysis server.
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2963323002 .
2017-07-05 23:29:46 -07:00
Brian Wilkerson
895f898b9b
Make analyzer respect exclusions from the analysis options file
...
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2967883002 .
2017-07-05 07:52:48 -07:00
Konstantin Shcheglov
3d831505a4
Cache AnalysisOptionsImpl objects for context directories.
...
This fixes the performance degradation which we had to introduce
in the previous CL.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2963583002 .
2017-06-27 12:18:41 -07:00
Konstantin Shcheglov
bc34583661
Issue 29960. Both CommandLineOptions and AnalysisOptions must be equal to reuse the context.
...
Unfortunately this makes running shared tests about 30% slower, because we have to perform I/O while trying to find analysis_options.yaml files corresponding to the files to be analyzed.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29960
Review-Url: https://codereview.chromium.org/2956093002 .
2017-06-27 09:33:00 -07:00
Brian Wilkerson
e28064f405
Restore partial analysis of analysis options files
...
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
Brian Wilkerson
62d0376231
Run the sorter to reduce code churn
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2933753002 .
2017-06-12 07:37:14 -07:00
Brian Wilkerson
b928683560
Add a couple of lints to the options files
...
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2933713002 .
2017-06-11 09:12:48 -07:00
Devon Carew
0b79e4d20d
update the analyzer and analysis server perf tags
...
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2917183003 .
2017-06-03 19:51:27 -07:00
pq
ba1a6e39f3
Update to fresh cli_util (0.1.0).
...
BUG=
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2894433002 .
2017-05-17 11:04:29 -07:00
Paul Berry
42ef3eb144
Analyzer CLI: fix machine format in build mode.
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2885063002 .
2017-05-16 09:01:49 -07:00
Paul Berry
f4d3f6cf45
Remove .iml files from the repository.
...
These files weren't providing enough benefit compared to the confusion
they were causing by showing up frequently in diffs.
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2878103002 .
2017-05-12 15:06:18 -07:00
Konstantin Shcheglov
a4fd5d814f
Extract PerformanceLogger from AnalysisDriver.
...
I also added the runAsync().
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2883633002 .
2017-05-12 14:27:50 -07:00
Paul Berry
b5bc14c0b4
Begin writing a TypeInferenceListener interface.
...
In the long term, this is intended to be used to communicate the
results of type inference from the front_end to analyzer. In the
short term, it can be used to debug type inference (by uncommenting
the print statements in type_inference_listener.dart).
R=scheglov@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2878733006 .
2017-05-12 13:31:26 -07:00
Konstantin Shcheglov
bdedd6768b
Add a way to use shared CanonicalName root to deserialize Program.
...
This allows for example to add SDK into a Program, then load the
"incomplete" Program A that has only the library A, and name sequences
that references SDK classes. Because we look into the nameRoot which
aleady has SDK CanonicalName(s), we can find these names while filling
the link table and use references which point to the existing SDK
AST nodes. Then we can load another set of library cycles, etc.
At the end we have a set of self-consistent libraries that we can
feed into DillTarget/DillLoader and resolve anothersource target
against it.
This CL is based on https://codereview.chromium.org/2872903005/
which has not been reviewed yet.
R=kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2874723002 .
2017-05-12 10:42:08 -07:00
Devon Carew
f1a5503fcc
Add --fatal-infos; hide --fatal-hints.
...
BUG=
R=brianwilkerson@google.com , danrubel@google.com
Review-Url: https://codereview.chromium.org/2874043002 .
2017-05-10 11:45:11 -07:00
Konstantin Shcheglov
bd1ee32543
Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
...
We are going to reuse ByteStore in front_end, also for incremental
compilation.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00
P.Y. Laligand
21e9c40b8f
Disable analysis on a few packages. ( #29571 )
2017-05-05 22:06:00 -07:00
Devon Carew
f6f845c879
Fix a completion exception during import suggestions.
...
BUG=
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2862793002 .
2017-05-04 09:24:18 -07:00
Konstantin Shcheglov
9a34ac9f27
Type inference for StringConcatenation.
...
The test simple_literal_string was replaced with string_literal.
R=paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2855403002 .
2017-05-04 08:47:12 -07:00
Konstantin Shcheglov
b567aeaeef
Change Accessor(s) to use AstFactory to create MethodInvocation, PropertyGet/Set.
...
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2857133004 .
2017-05-03 14:10:54 -07:00
Devon Carew
5d0056df88
Make the exit code for dartanalyzer more deterministic.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2857203002 .
2017-05-03 11:38:35 -07:00
Paul Berry
d842f35bb2
Add a strong mode implementation of LUB to fasta; use it to infer ?:
...
R=ahe@google.com , leafp@google.com
Review-Url: https://codereview.chromium.org/2849213002 .
2017-05-03 10:36:47 -07:00
danrubel
9649ca1a94
fix driver test
...
Review-Url: https://codereview.chromium.org/2855513002 .
2017-04-30 23:35:59 -04:00
danrubel
c8784af933
rename .analysis_options --> analysis_options.yaml
...
See https://github.com/dart-lang/sdk/issues/28385
R=brianwilkerson@google.com , vsm@google.com
Review-Url: https://codereview.chromium.org/2839383003 .
2017-04-30 18:33:10 -04:00
Brian Wilkerson
e009f32ad7
Fix a failing test
...
Review-Url: https://codereview.chromium.org/2848643004 .
2017-04-27 10:45:24 -07:00
Brian Wilkerson
511a06ee00
Fix some issues with options handling
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2844663003 .
2017-04-27 10:22:37 -07:00
pq
ef60d4b46e
IML updates for 2017.
...
BUG=
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2852483003 .
2017-04-27 10:17:39 -07:00
Devon Carew
66ac96c4a6
Use the dart:io Platform.resolvedExecutable API to locate the Dart SDK.
...
BUG=
R=brianwilkerson@google.com , danrubel@google.com , pquitslund@google.com
Review-Url: https://codereview.chromium.org/2844883005 .
2017-04-27 09:29:08 -07:00
Jacob MacDonald
466d951c25
Add support for unlinked summary inputs through --build-summary-unlinked-input
...
BUG=
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2836873005 .
2017-04-26 09:11:33 -07:00