Brian Wilkerson
f5942a5ce0
Add support for analyzing analysis options and pubspec files
...
Change-Id: I2aa05e5822b2993d0f1e903396c816b52e2292b4
Reviewed-on: https://dart-review.googlesource.com/41566
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-02-14 22:50:05 +00:00
Ross Wang
879431330e
Bumping protobuf version to ^0.7.0
...
Fuchsia is including some dart proto code that expects protobuf 0.7.0.
Change-Id: Ie42a3751a2d3a7e51e759b9913d0901ecefafc70
Reviewed-on: https://dart-review.googlesource.com/40480
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Zach Anderson <zra@google.com >
2018-02-14 19:28:23 +00:00
Paul Berry
421db9c69c
Re-land "Implement proper checking for callability of Function class."
...
(was reverted in https://dart-review.googlesource.com/c/sdk/+/40980
due to an analyzer bot breakage)
Original commit message:
Implement proper checking for callability of Function class.
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks. This flag has been removed, since the new
behavior is now standard in Dart 2.0.
Fixes #31509
Change-Id: Ice5cf38bbc648badf7f2563ff930b69f9a799635
Reviewed-on: https://dart-review.googlesource.com/41120
Reviewed-by: Jonas Termansen <sortie@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-02-14 11:30:23 +00:00
Paul Berry
35aea15097
Revert "Implement proper checking for callability of Function class."
...
This reverts commit 6837dafcc3 .
Reason for revert: Broke analyzer bots.
Original change's description:
> Implement proper checking for callability of Function class.
>
> There was some old (incorrect) logic for doing this, behind the flag
> enableStrictCallChecks. This flag has been removed, since the new
> behavior is now standard in Dart 2.0.
>
> Fixes #31509
>
> Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
> Reviewed-on: https://dart-review.googlesource.com/40509
> Commit-Queue: Paul Berry <paulberry@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,brianwilkerson@google.com ,mfairhurst@google.com
Change-Id: Ib631ad16bc5e937ff914127d1c5330f3fcaff2c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/40980
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-02-13 19:56:35 +00:00
Paul Berry
6837dafcc3
Implement proper checking for callability of Function class.
...
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks. This flag has been removed, since the new
behavior is now standard in Dart 2.0.
Fixes #31509
Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
Reviewed-on: https://dart-review.googlesource.com/40509
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
2018-02-13 14:19:08 +00:00
Konstantin Shcheglov
95c2bb7c2c
Fix parts analysis in build mode without building summaries.
...
R=brianwilkerson@google.com
Change-Id: I67e33b0d5d403402ce7954106081e57fee3ef9ce
Reviewed-on: https://dart-review.googlesource.com/38781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-02-05 18:50:26 +00:00
Jaime Wren
8b9e1bda84
Copy the CLI flag into the AnalysisOptions file
...
Change-Id: I0c5da5f884ed1343f2dbb999fed136f49bd55103
Reviewed-on: https://dart-review.googlesource.com/37649
Reviewed-by: Jaime Wren <jwren@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jaime Wren <jwren@google.com >
2018-01-31 17:26:55 +00:00
Zachary Anderson
74fc14dad7
Update args deps in analysis_server pubspec
...
Change-Id: I10090757fa7b6d776b9ab6948cdaee60ef4129c4
Reviewed-on: https://dart-review.googlesource.com/35802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Zach Anderson <zra@google.com >
2018-01-18 22:16:44 +00:00
Zachary Anderson
9c40a7e662
Reland: [dart:cli] Adds waitFor(Future)
...
This is a reland of https://dart-review.googlesource.com/#/c/sdk/+/28920/
with the following changes:
- It creates a new library dart:cli
- waitFor(Future) goes in dart:cli instead of dart:io
- Removes a flaky test, and adds a missing precompiler entrypoint
- Adds waitFor(Future)
- Improves doc comments
fixes #31102
Change-Id: I04d2c46fd0afac049dd4fd1353905dc20da18f90
Reviewed-on: https://dart-review.googlesource.com/29449
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Natalie Weizenbaum <nweiz@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2018-01-18 16:38:54 +00:00
Jaime Wren
cd878bc433
Create the new flag --use-cfe in the analyzer, analysis server and analyzer_cli and migrate the old behavior of --preview-dart-2 to --use-cfe. The --preview-dart-2 flag is now a no-op, with functionality coming soon.
...
See https://github.com/dart-lang/sdk/issues/31640
Change-Id: I2db2e7ef6a324cbd5d369b807e331495fed167df
Reviewed-on: https://dart-review.googlesource.com/33121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Jaime Wren <jwren@google.com >
2018-01-08 22:37:05 +00:00
Devon Carew
3bca5b6a1d
Duplicate some analyzer cli tests to also run in --preview-dart-2.
...
Bug:
Change-Id: Ic2b96434e58a7d3eff3ff9aef1bcb540d8f4f0ce
Reviewed-on: https://dart-review.googlesource.com/29623
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2017-12-14 22:18:35 +00:00
Devon Carew
6346b18028
Restore a strong mode analyzer cli test.
...
Bug:
Change-Id: If9b459d99a3120071ba8f3a7bd9aa1d2e776bbd6
Reviewed-on: https://dart-review.googlesource.com/29443
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2017-12-13 22:26:56 +00:00
Jens Johansen
22d0696d91
[CFE] Move front-end API under src/
...
This CL deprecates the front-end API and moves it into src/api_prototype.
For now all usages have been updated to point to the new location,
but they should be updated to use custom-client invocations instead (e.g.
one specific way for DDC, another for dart2js etc.)
Bug:
Change-Id: I9b4f41f6ebf55d42510fd35240d942d1dc7292d6
Reviewed-on: https://dart-review.googlesource.com/24822
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2017-12-01 08:42:16 +00:00
Konstantin Shcheglov
e67cd0daab
The very first CL for end-to-end integration of FrontEnd resolution into Analysis Server.
...
At this point KernelDriver is used only by Analyzer, so I don't include
anyone from the FrontEnd team. We will merge to get the same performance
benefits of the latest IKG approach, but later.
Only just enought integration is done - we can store and apply
types in the local variable declaration.
Everything is in disarray, I will follow up with improvements.
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: Ie3434e26233b84fb019c50a7cc834a08d0dadbed
Reviewed-on: https://dart-review.googlesource.com/22202
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-11-20 22:42:09 +00:00
Konstantin Shcheglov
5ea30b4e3d
Rename performace_logger.dart to performance_logger.dart
...
R=paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov
ffadd1ed3d
When running analyzer_cli with --preview-dart-2, load SDK from vm_outline.dill.
...
We need this to be able to access classes that are required by Fasta,
but come from VM patches.
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I4d29e1dca42e016446516a2dab0fae138cb74548
Reviewed-on: https://dart-review.googlesource.com/16863
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-26 23:34:18 +00:00
P.Y. Laligand
ce79a77331
Remove Fuchsia-specific build files.
...
Also fix Fuchsia tools to account for new project location (//third_party/dart).
Change-Id: If89a934729c4fa44229eaca83219dbdf8bb700a8
Bug:
Reviewed-on: https://dart-review.googlesource.com/14800
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
2017-10-19 17:52:37 +00:00
Konstantin Shcheglov
aab22a8f9b
When analyzer_cli is given --preview-dart-2, use KernelDriver.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: Ibde08b9732c3e750cf78bd0af48cfa3ef17fa4a4
Reviewed-on: https://dart-review.googlesource.com/14881
Reviewed-by: Paul Berry <paulberry@google.com >
2017-10-18 19:35:41 +00:00
Konstantin Shcheglov
0dbc39cb5f
Revert "When analyzer_cli is given --preview-dart-2, use KernelDriver."
...
This reverts commit 7d28e6fc21 .
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> When analyzer_cli is given --preview-dart-2, use KernelDriver.
>
> R=brianwilkerson@google.com , paulberry@google.com
>
> Bug:
> Change-Id: I91484f906a691fba80917f8fd8ec1c0628c0815f
> Reviewed-on: https://dart-review.googlesource.com/14505
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
TBR=paulberry@google.com ,scheglov@google.com ,brianwilkerson@google.com
Change-Id: Ib440303cd82d6ebb14ef7d14efdb6b535cc0bf88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/14580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-10-17 19:06:11 +00:00
Konstantin Shcheglov
7d28e6fc21
When analyzer_cli is given --preview-dart-2, use KernelDriver.
...
R=brianwilkerson@google.com , paulberry@google.com
Bug:
Change-Id: I91484f906a691fba80917f8fd8ec1c0628c0815f
Reviewed-on: https://dart-review.googlesource.com/14505
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-17 18:10:04 +00:00
Brian Wilkerson
fbd7619b2e
Remove missed references to enableAssertInitializers
...
Change-Id: I2403d8bbc5db877bfdf28cc05f4e498d95b1b06d
Reviewed-on: https://dart-review.googlesource.com/11260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-10-05 17:44:20 +00:00
Brian Wilkerson
082bbdb6a7
Remove flag and enable asserts in initializers by default
...
Change-Id: Ia81f5ec936981dc08ff4c740f3511c6b7c9e6eb6
Reviewed-on: https://dart-review.googlesource.com/10740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-10-04 18:45:09 +00:00
Sigmund Cherem
436ed70100
Add preview-dart-2 flag to analyzer cli and plumb it through test.py.
...
This allows us to collect stats about language-style tests as follows:
./tools/test.py -m release -c dart2analyzer -r none --preview-dart-2 --report \
language language_2 corelib corelib_2
As of this morning, the command above has 87% of the tests passing.
Change-Id: I0f84211d5f33659d5923601267367be90c578107
Reviewed-on: https://dart-review.googlesource.com/3381
Reviewed-by: William Hesse <whesse@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-07 20:13:40 +00:00
Konstantin Shcheglov
1b4239d2e4
Export ByteStore and its implementations from front_end.
...
R=ahe@google.com , paulberry@google.com , sigmund@google.com
Bug:
Change-Id: Ie2e3413a7f143e270cec2bd3ae4564ad7cc315b1
Reviewed-on: https://dart-review.googlesource.com/3840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2017-09-07 19:23:21 +00:00
Konstantin Shcheglov
455984bbf9
Fix fuzzy arrow warnings in analyzer and analysis_server.
...
There is one warning which I'd like to fix in a separate CL.
The rest is because of package:test predicate().
I think Leaf fixed it in https://github.com/dart-lang/matcher/commit/3625f13698346576da0f5baf44e95abc9c56fb49
R=brianwilkerson@google.com
Bug:
Change-Id: I060f7ced55dbcc460185916251c47ebbd5c838d3
Reviewed-on: https://dart-review.googlesource.com/3404
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-06 00:26:18 +00:00
Konstantin Shcheglov
90a037aae3
Use runAsync() when perform request.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/3003823002 .
2017-08-25 08:10:49 -07:00
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