This is similar to --package-warnings, except that diagnostics will
only be reported for Dart packages matching the given prefix.
Also added the number of source files analyzed and the number of
errors generated to performance report.
Cleanup: simplified code for triggering diet parsing.
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1806263004 .
If we aren't doing full analysis, then we can't use
`context.librarySources` to find out the set of library sources (because
it doesn't include sources that haven't been examined yet). Instead, we
have to query each source to find out its type.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1770323003 .
The path passed to "--packageMode" must be converted to an absolute path
because it is used to normalize file paths (which are automatically
converted to absolute paths by the PhysicalResourceProvider.
We should not call `resourceProvider.pathContext.absolute()`. This
seems (by its name) like it would convert its argument to an absolute
path. But in fact it simply prepends the path with
`resourceProvider.pathContext.current`, which is `.`, and this causes
Source objects to be created referring to non-canonical paths.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1762363002 .
I think the fix does the change needed to configure SDK for using
the strong mode summary, but I was not able to verify this fully
because of the exception with LibraryElementHandle.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1734773003 .
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 .
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 .
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 .
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 .