Commit Graph

583 Commits

Author SHA1 Message Date
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
Sigmund Cherem b9a5c77321 Fixs in perf.dart: strong-clean, avoid deprecated apis, minor output tweaks
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org/2349683003 .
2016-09-16 09:57:03 -07:00
Sigmund Cherem 4af56d5647 entrypoint to measure performance of the analyzer frontend
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2339803004 .
2016-09-15 15:43:09 -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
Brian Wilkerson fe02411930 Remove several references to JavaFile
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2323173002 .
2016-09-09 07:45:40 -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
Konstantin Shcheglov ac81124b8c Revert "Use dependency_overrides / analyzer in analysis_server."
This reverts commit 72f5463631.

Yes, we do have bot failures :-(

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

Review URL: https://codereview.chromium.org/2298423002 .
2016-08-31 15:01:10 -07:00
Konstantin Shcheglov 72f5463631 Use dependency_overrides / analyzer in analysis_server.
RFC

We always do this locally, but until analysis_server is published,
we could just keep this change in repo.

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

Review URL: https://codereview.chromium.org/2298973002 .
2016-08-31 14:44:09 -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
Kevin Moore 17a2ddfd42 Update dependency on pkg/package_compiler
For analysis_server, analyzer, analyzer_cli, compiler packages

Progress on https://github.com/dart-lang/sdk/issues/26711

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2172683002 .
2016-07-27 08:42:05 -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 6682e74526 Use package_config 0.1.5 in analyzer_cli to get performance improvements.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2055363002 .
2016-06-10 13:30:05 -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
pq 43bbf11dd8 SDK ext test fix (add missing packages file).
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org/1988603003 .
2016-05-17 13:49:04 -07:00
pq fb99a26b21 Test exit code handling fix [TBR].
TBR in a quest for build greenness...

BUG=

Review URL: https://codereview.chromium.org/1984323004 .
2016-05-17 12:37:39 -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