also sorted members per analyzer style (?)
figured it would be easier to work on as a 0.5k file vs ~15k resolver.dart :)
For now I left TypeProvider where it was. Not sure if it should move here or into its own file as well.
For backwards compat, all of the types are re-exported from resolver.dart.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1407923009 .
Basic YAML map merging suitable for merging a default map with an overriding one.
The semantics favor the overrider with a twist to support a short-hand for lists that stand-in for maps of scalars to booleans. Specifically, lint rules can be enumerated as a list or as a map. To make this work, lists can be "promoted" to maps. In particular, if
linter:
rules:
- camel_case_types
- one_member_abstracts
is merged with
linter:
rules:
one_member_abstracts: false
always_specify_return_types: true
the right thing is done to get us to:
linter:
rules:
camel_case_types: true
one_member_abstracts: false
always_specify_return_types: true
R=brianwilkerson@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1425393002 .
When we add a new file in IDEA and open it in the editor, this causes
analysis.setSubscriptions to be send immediately, even before watcher
notices it. The server reacts by requesting the fully resolved unit, and
so causes creation of a not-explicit CacheEntry. So, when later we handle
applyChanges(), the entry already exists. In this case we still need to
mark it as explicit.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1411243010 .
* Adds language configuration support to `.analysis_options`:
analyzer:
language:
enableSuperMixins: true
(with validation).
* Extracts context configuration out of `server` context_manager and into `analyzer` where it can be re-used by `analyzer_cli`.
* Some general cleanup of option validation (with more to come!)
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1423333002 .
* Adds a new extension point to allow for contributing OptionsValidators.
* Adds a new linter 'service' to server that contributes a lint-aware validator.
You'll notice that the warning code I added is NOT in `errors.dart`. I did that in anticipation of plugin-specifc warnings living elsewhere. If that's not the right angle, happy to un-do!
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1418333002 .
it looks like some old code was hanging around that tried to substitute generic type parameters by name. This is unnecessary because we already have a substituted type at this point, and the type variable we were substituting had no relationship at all with the parameter. After removing the code, all tests seem to be passing.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1409143009 .
...instead of ensuring this separately for complete closures of every library.
This improves initial analysis performance from about 44 seconds to 39.
This also makes WorkOrder.moveNext less expensive - to about 5.6% during initial analysis.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1412273004 .
Adds a new block of status that reports the last 10 performed tasks.
For example:
<p>Recent Tasks</p>
GatherUsedLocalElementsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GatherUsedImportedElementsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GenerateHintsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GenerateLintsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
VerifyUnitTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
LibraryUnitErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
DartErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
LibraryErrorsReadyTask for source /Users/pquitslund/src/git/clones/analyzer_cli/test/mocks.dart
GetContentTask for source /Users/pquitslund/src/git/clones/analyzer_cli/.analysis_options
GenerateOptionsErrorsTask for source /Users/pquitslund/src/git/clones/analyzer_cli/.analysis_options
R=brianwilkerson@google.com, keertip@google.com
Review URL: https://codereview.chromium.org/1420783004 .
It's not perfectly useful - it computes just cumulative timings.
So, it includes not just time for extracting and gathering inputs, but also actual time to compute them.
But it is still useful to compare between runs after changes to tasks inputs, because computing time
should be the same, so the difference is this extracting/gathering time.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1406983007 .
This reduces number of LibrarySpecificUnit instances from 10,000,000 to about 6,000.
Also this slightly improves the code of corresponding 'buildInputs' methods.
This saves some memory, but unfortunately does not win any performance.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1422793002 .
This CL introduces the code generation tools in analyzer, but leaves analysis_server
untouched. In a later CL, after a new version of analyzer has been
published, I'll refactor analysis_server to point to these tools and
remove the corresponding code from analysis_server.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1411153007 .