Commit Graph

583 Commits

Author SHA1 Message Date
Konstantin Shcheglov 686b30e4cb Initial hermetic package analyzer.
When --package-mode is specified, this turns ON the single package
analysis mode. My initial idea was to accept a single path - the root
folder of the package and analyze the package completely as Dart
Analysis Server does. But later I decided to accept a list of files
to analyze, at least for now.

We still need the --package-mode-path option with the path to the root
folder of the package because we need to know which libraries are in
the 'lib' folder and write these libraries into the output summary.

The option --package-name is used to write the same URIs into
summary as the clients are going to use to refer the package
libraries, and also as the package references itself.

Multiple --package-summary-input=pkg,summary options can be specified,
one for each package. Every referenced package (except itself) must
be listed.

If --package-summary-output is specified, the output summary of
the package is written to the specified file. It is up to the client
to specify the correct X.spec.sum or X.strong.sum names.

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

Review URL: https://codereview.chromium.org/1720963003 .
2016-02-22 17:19:27 -08:00
Konstantin Shcheglov 09672f09c6 CLI. Always fully parse given target files.
It seems that we have a bug - when we analyze a SDK library during
running shared tests, we still parse it dietly so we don't actually
validate that bodies are warning-free.

And when we attempt to use SDK summary, we again parse a library
dietly, but then attempt to apply the full summary using
DeclarationResolver, which fails because we fail to bind some elements
to not parsed nodes.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1689263004 .
2016-02-12 07:02:43 -08:00
pq 37767eff86 Hooks for injecting embedder resolver providers.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1666573006 .
2016-02-04 11:03:43 -08:00
Brian Wilkerson 5b95009a6b Move ResolverProvider to analyzer so that it can be shared
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1658663002 .
2016-02-01 08:12:29 -08:00
Brian Wilkerson 3fa4b0fadb Add hook to command-line analyzer similar to server
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1646413003 .
2016-01-29 13:31:25 -08:00
pq 9b1fa223a8 Embedded libs key rename to defuse server landmine.
1.13 stable builds of the SDK contain a version of server that fails catastrophically when analyzing source that imports packages that define embedded libraries. Since we can't pragmatically require more recent SDKs for flutter development we have been prevented from landing embedded libs in the flutter engine.  By renaming the key we use to identify contributed libraries, this change avoids the issue.  Old versions of server will simply ignore the new key and new ones will process it properly.  Win-win!

BUG=
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1643023002 .
2016-01-29 09:52:04 -08:00
Brian Wilkerson 348b79b8ec Set the SDK analysis options in analyzer_cli
R=jmesserly@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/1644093002 .
2016-01-29 07:42:31 -08:00
pq 3d3c9c5af4 CLI support for embedders (#25380).
Background here: https://github.com/dart-lang/sdk/issues/25380

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1631763007 .
2016-01-26 11:33:14 -08:00
pq 1dcec8c35f Bootloader cleanup.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1570603004 .
2016-01-11 14:13:44 -08:00
Brian Slesinsky adacaefeda add tasks to perf report
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1539783002 .
2016-01-05 17:41:53 -08:00
Brian Slesinsky ba1b82b240 Add --x-perf-report flag to the dartanalyzer command
Also added a couple of performance tags to catch time spent in the driver.

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

Review URL: https://codereview.chromium.org/1524413002 .
2015-12-17 11:40:15 -08:00
pq 8887cd69f0 Fix analyzer_cli error overrides (#24452).
Brings `analyzer_cli` inline with server wrt processing errors configured in `.analysis_options`.

Note some added complexity due to interactions with flags that globally escalate warnings/hints to errors.

https://github.com/dart-lang/sdk/issues/24452

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1529243002 .
2015-12-16 12:44:38 -08:00
Brian Slesinsky 4fad247dc6 remove obsolete cache size parameter
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1530103002 .
2015-12-16 12:35:20 -08:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
pq e4e61ee462 Disable temp-dir hosted tests pending fixes.
Background here: https://github.com/dart-lang/sdk/issues/25258

BUG=

Review URL: https://codereview.chromium.org/1526533003 .
2015-12-14 15:04:43 -08:00
pq fd0f649327 Driver failure mode fixes (and test cleanup).
* `printAndFail(msg)` doesn't exit in testing (so we need to return null).

R=keertip@google.com

Review URL: https://codereview.chromium.org/1530453002 .
2015-12-14 13:58:05 -08:00
pq 5a57d6e8dc CLI driver test re-enablement (#25001).
Another stab.  The rub, I *think*, to our failures are unexpected calls to `exit()` on the bots (that are not reproducing locally).  These fixes should address that (and fix error stream handling along the way).

* fixes test setup and teardown to ensure exit handling is properly managed.
* fixes driver source to use the `exitHandler` and `errorSink` consistently

BUG=
R=keertip@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1525623003 .
2015-12-14 13:08:47 -08:00
pq 1c3df7f4ec Revert "Make analyzer_cli tests bot-friendly (#25001)."
This reverts commit e67affe6b6.

R=keertip@google.com

Review URL: https://codereview.chromium.org/1524493002 .
2015-12-11 14:57:01 -08:00
pq e67affe6b6 Make analyzer_cli tests bot-friendly (#25001).
* re-enables a host of tests that were breaking on the bots due to path issues

Bug: https://github.com/dart-lang/sdk/issues/25001

R=keertip@google.com

Review URL: https://codereview.chromium.org/1516353003 .
2015-12-11 14:13:30 -08:00
pq 63f24be16c Update server/cli linter pubspec deps.
* bumps lower-bound to grab a `0.27.0`-compatible linter.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1520973002 .
2015-12-11 10:51:50 -08:00
pq 56650e6bfe More mock cleanup.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1520673002 .
2015-12-10 14:37:22 -08:00
pq ad7c566e04 Driver test fixes.
* Updates to use new CONFIGURED_ERROR_PROCESSORS (rather than defunct CONFIGURED_ERROR_FILTERS).

BUG=
R=keertip@google.com

Review URL: https://codereview.chromium.org/1520663002 .
2015-12-10 14:22:16 -08:00
pq 166de569a1 CLI doc update to remove contributor bits.
In the absence of a `CONTRIBUTOR.md` doc (or similar) for the SDK, remove contributor bits.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1511663002 .
2015-12-08 12:40:34 -08:00
Brian Wilkerson ea3ba0e31f Remove deprecated code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1502213002 .
2015-12-07 10:24:36 -08:00
Brian Wilkerson 600fc17de1 Clean-up the registration of plugins
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -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
pq 8d613feaf9 Migrate mockito mocks to typed_mock (#24994).
BUG=24994
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1462393002 .
2015-11-20 13:57:56 -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
pq 7c15fa857c More bot-unfriendly test fixing [TBR].
Remove tests pending update.

Background: https://github.com/dart-lang/sdk/issues/25001

BUG=25001

Review URL: https://codereview.chromium.org/1463133002 .
2015-11-19 16:52:14 -08:00
pq c58e064b67 Remove bot-unfriendly tests (#25001).
Remove tests pending update.

Background: https://github.com/dart-lang/sdk/issues/25001

BUG=25001

Review URL: https://codereview.chromium.org/1459083005 .
2015-11-19 16:15:18 -08:00
pq 9ae1265ff5 analyzer_cli move to SDK.
Tracking bug: https://github.com/dart-lang/sdk/issues/24731

Note, dartium build changes are in a separate CL: https://codereview.chromium.org/1453413006/

Some tests had to be disabled for want of mockito in the SDK; tracking their reimplementation is here: https://github.com/dart-lang/sdk/issues/24994

BUG=24731
R=whesse@google.com

Review URL: https://codereview.chromium.org/1459683003 .
2015-11-19 14:52:54 -08:00
pq 5cc9a288bb Revert "Move analyzer_cli into the SDK."
This reverts commit a573ed31f1.

BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org/1462143002 .
2015-11-19 11:28:52 -08:00
pq a573ed31f1 Move analyzer_cli into the SDK.
Build changes to follow.

Tracking bug: https://github.com/dart-lang/sdk/issues/24731

BUG=24731
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1464553003 .
2015-11-19 11:11:17 -08:00