Paul Berry
2839653161
Fix generation of analysis results in analyzer_cli "build mode".
...
This was inadvertently broken in 1b10de1a86 .
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2350963005 .
2016-09-20 10:07:11 -07:00
Konstantin Shcheglov
979a9bd6da
Remove incremental session from analyzer_cli.
...
This should have been done together with 1310dc801a .
TBR
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2348283004 .
2016-09-19 15:06:03 -07:00
Konstantin Shcheglov
1387e8ec5c
Remove fallback mode and corresponding cli flag.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2356523002 .
2016-09-19 14:02:14 -07:00
Konstantin Shcheglov
1b10de1a86
Generate only AST based summaries in build mode.
...
Should we also remove fallback mode?
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2355613003 .
2016-09-19 13:47:38 -07:00
Paul Berry
f7a12f9c83
Allow input summaries to be specified when running analyzer_cli in non-build mode.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2347133004 .
2016-09-19 12:39:24 -07:00
Konstantin Shcheglov
f5a616834e
Use configurations and declared variables to select import/export URIs during prelinking.
...
R=paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/27045
Review URL: https://codereview.chromium.org/2353433002 .
2016-09-18 14:04:01 -07:00
Brian Wilkerson
a5ee525e14
Add support for accessing field formal parameters in the initializer list of constructors
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2335693002 .
2016-09-12 09:48:34 -07:00
Brian Wilkerson
fa1b80fd82
Remove references to deprecated code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2331743002 .
2016-09-10 11:28:43 -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
Brian Wilkerson
5bd4de469e
Clean up warnings and hints
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2324463006 .
2016-09-09 09:09:59 -07:00
Paul Berry
94309733cd
Revert "Remove unnecessary hide clauses"
...
The `Resource` class wasn't removed from the SDK until version
1.20.0-dev.0.0, which was only recently published. Reverting this
change to allow people using older SDK releases a little more time to
upgrade.
This reverts commit 2cdafd82c2 .
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2299243002 .
2016-09-01 16:08:43 -07:00
Brian Wilkerson
2cdafd82c2
Remove unnecessary hide clauses
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2305453002 .
2016-08-31 16:44:52 -07:00
Brian Wilkerson
1a9cafd85c
Replace uses of FileBasedSource in cli
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2257023002 .
2016-08-18 06:11:28 -07:00
Brian Wilkerson
c41427383b
Deprecate DirectoryBasedDartSdk and transition existing uses to the new API
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2242853002 .
2016-08-12 09:18:12 -07:00
Paul Berry
902ce5e739
Record information about a summary's dependencies in the summary itself.
...
The idea is that we can use this information to help discover related
summary files, and determine when summaries need to be re-linked.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2226093002 .
2016-08-09 09:31:04 -07:00
Konstantin Shcheglov
43fef756ae
Provide LINE_INFO from ResynthesizerResultProvider.
...
Also, to guarantee that LINE_INFO is computed, we need to replace
context.getLineInfo() with context.computeLineInfo() in the server.
This should be equivalently fast in both summary (from provider) and
non-summary cases (the source should have been scanned and parsed in
order to resolve references to its elements).
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2225893003 .
2016-08-09 09:12:24 -07:00
Konstantin Shcheglov
b3588f44fe
Add line starts into unlinked units.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2223113002 .
2016-08-08 11:40:05 -07:00
Brian Wilkerson
b47d35d706
Clean up use of resource provider in cli
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2212813003 .
2016-08-04 12:31:10 -07:00
Brian Wilkerson
5b26441dbf
Convert server and cli and deprecate the old implementation
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2214613003 .
2016-08-04 11:28:16 -07:00
Brian Wilkerson
f8d7925ff2
Mark analyzer_cli as strong-mode clean
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2196393003 .
2016-08-01 12:44:59 -07:00
John Messerly
4b3c06f3c5
add no-implicit-casts and no-implicit-dynamic options
...
* adds these to dartanalyzer command line
* adds them to .analysis_options
R=leafp@google.com
Review URL: https://codereview.chromium.org/2144383002 .
2016-07-15 16:08:20 -07:00
Brian Wilkerson
f14772d8c9
Fix NPE when a resolver provider is given
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/2136083003 .
2016-07-11 13:06:00 -07:00
Paul Berry
a35c9415f5
Add option "--build-summary-output-semantic" to analyzer_cli.
...
This option has the same functionality as the flag
"--build-summary-exclude-informative", except it is an option rather
than a flag. This makes it possible to get both a "full" summary and a
"semantic" summary by specifying both "--build-summary-output" and
"--build-summary-output-semantic".
The flag "--build-summary-exclude-informative" is kept around to ease in
transitioning tools, but it is deprecated.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2104003004 .
2016-06-29 10:25:50 -07:00
pq
1ec13d1548
Fix pipe escaping.
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2109783003 .
2016-06-28 15:17:46 -07:00
John Messerly
1b9bf0769d
fix #26122 , classify strong mode errors correctly
...
StaticTypeWarningCode was being handled, but many warnings with StaticWarningCode also need to be treated as errors.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2108823002 .
2016-06-28 14:35:44 -07:00
Brian Wilkerson
5c97a88ddd
Remove embedder locator from analysis context
...
R=pquitslund@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2078993002 .
2016-06-17 09:42:27 -07:00
Brian Wilkerson
2b522d50d0
Deprecate EmbedderUriResolver
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/2076743002 .
2016-06-17 07:44:02 -07:00
Jaime Wren
7f244c8d39
Deprecate FileUriResolver and RelativeFileUriResolver in source_io.dart, replace the usages with ResourceUriResolver(PhysicalResourceProvider.INSTANCE).
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2060263006 .
2016-06-16 11:14:03 -07:00
Brian Wilkerson
34a71429d9
Remove hook for setting a provider for an EmbedderUriResolver
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/2075663002 .
2016-06-16 10:28:40 -07:00
Brian Wilkerson
dc7fb35bd4
Refactor common portions of the two SDK implementations into a base class
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/2069483002 .
2016-06-16 08:57:32 -07:00
Konstantin Shcheglov
e2cb8df046
Compact incremental cache when we're done using it.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2064613004 .
2016-06-13 13:25:03 -07:00
Konstantin Shcheglov
6d49c787dc
Stop tracking cache dependencies in analyzer_cli.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2058253002 .
2016-06-10 14:29:34 -07:00
Konstantin Shcheglov
676a9f7d60
Compute IGNORE_INFO and filter DART_ERRORS.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2048713002 .
2016-06-07 09:56:14 -07:00
Konstantin Shcheglov
1074d44c65
Serve DART_ERRORS from incremental cache.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2045793003 .
2016-06-06 20:25:33 -07:00
Konstantin Shcheglov
a42317f2de
Serve INCLUDED_PARTS from incremental cache.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2044513003 .
2016-06-06 16:00:37 -07:00
Konstantin Shcheglov
e87a9c955c
Start adding experimental incremental analysis mode into CLI analyzer.
...
At the moment it is not very useful, because it does not use or store
errors from incremental cache yet. But I hope to implement this soon.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2039773004 .
2016-06-06 11:35:55 -07:00
pq
fba5cbc425
Analyzer 0.27.4-alpha.9 (API fixes) ( #26562 ).
...
Restores `EmbedderUriResolver` API.
Addresses breakages in `dartdoc` and any other downstream dependencies.
See: https://github.com/dart-lang/sdk/issues/26562 .
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2021453003 .
2016-05-29 06:57:42 -07:00
pq
53fe39137f
Embedder support refactoring (phase 1).
...
A bunch of changes to pave the way for emebdder SDK summary creation.
* Moves _embedder.yaml processing into the embedder SDK (out of the resolver).
* Changes EmbedderUriResolver to compose rather than extend a DartUriResolver.
* Fixes the wierd handling (dropping to add back) of `dart:` URIs.
* Fixes the incorrect overriding docs for `SDKLibraryImpl.shortName`.
* Updates embedder test to include a definition of `dart:core` in anticipation of adding some embedder SDK tests.
Some API work TODO in a follow-up CL (notably the way we check for the presence of embedders by querying the resolver is odd).
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2009303002 .
2016-05-25 10:52:53 -07:00
pq
ff857f1b71
CLI cleanup.
...
A little linting.
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1986943002 .
2016-05-18 10:30:09 -07:00
Konstantin Shcheglov
34d5d4f55c
When in strong mode, analyze with dart2js paths.
...
This would correspond to the code in build_sdk_summaries.dart, which
creates strong mode summaries.
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/26466
Review URL: https://codereview.chromium.org/1988853002 .
2016-05-17 12:20:39 -07:00
pq
31a03ec31b
Skip SDK summaries in the presence of SDK extenders ( #26448 ).
...
Works around crash provoked by mojo: https://github.com/dart-lang/sdk/issues/26448 .
The rub is that using SDK summaries in the presence of SDK extenders (and embedders) is unsafe.
Greater context: https://github.com/dart-lang/sdk/issues/26467 .
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1990463002 .
2016-05-17 11:10:43 -07:00
Konstantin Shcheglov
048d396f1b
Fix for analyzer-cli and the new SummaryBasedDartSdk 'strongMode' parameter.
...
I broke the build :-(
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1979193010 .
2016-05-16 15:03:35 -07:00
pq
7937623063
Don't use SDK summaries with embedders ( #26448 ).
...
Addresses the issue seen in https://github.com/dart-lang/sdk/issues/26448 .
Ultimately we want a better story for summaries in the presence of embedded SDKs; in the short-term this simply disables them.
The trick (and reason for all of the changes here) is that there is *a lot* of temporal coupling in the initiailization of contexts, sdks, resolvers, etc. With this change, embedder processing is pulled out to where it can be done before the SDK is configured. Hopefully this even makes this a bit more clear as resolver setup is less complex.
Open question: I think the logic that calls `pub list-dirs` is dead and can safely be removed. Comments there welcome.
Thanks!
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1984733003 .
2016-05-16 14:13:40 -07:00
Konstantin Shcheglov
a4862dd22a
Add '--dart-sdk-summary' option to analyzer-cli and use SummaryBasedDartSdk.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1974323003 .
2016-05-13 12:56:09 -07: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
Jacob MacDonald
6b7139d896
Dont search for the sdk on startup in worker mode
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1974993002 .
2016-05-12 15:07:01 -07:00
Paul Berry
92f5fc8836
Handle missing sources properly when building AST-based summaries.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1966443002 .
2016-05-10 14:15:14 -07:00
pq
7913968725
Fix CLI SDK option config timing ( #26129 ).
...
Fixes: https://github.com/dart-lang/sdk/issues/26129
The issue was that we were creating the SDK and populating its options (notably `strong-mode`) *before* options processors were called. The result was that client code analysis contexts and SDK contexts were getting configured differently causing confusion when client code was getting analyzed with a non-strong-mode SDK.
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1962403002 .
2016-05-10 13:35:40 -07:00
Konstantin Shcheglov
e7b51f7bd1
Issue 26426. Don't use SDK summarie when analyzing SDK itself.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26426
Review URL: https://codereview.chromium.org/1963023002 .
2016-05-10 09:54:24 -07:00
Paul Berry
baa7dac310
Allow zero analyzer args in build mode.
...
This simplifies the integration with build systems such as Bazel, in
which it is sometimes convenient to have a build unit which depends on
other build units but doesn't introduce any additional source files of
its own.
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1960263003 .
2016-05-09 12:39:06 -07:00