Instead of passing around opaque Objects which are the result of
calling the Builder.finish() methods, we pass around the Builder
objects themselves, and we call finish() from within the generated
code. This pushes the lack of type safety into the generated code,
leaving the handwritten code type safe.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1452363002 .
At the moment these tests are mostly redundant, since the semantics of
cascaded combinators are implemented elsewhere. However, when we add
a relinking mechanism these tests will ensure that cascaded combinator
semantics are properly implemented by the relinker.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1455693002 .
- If a package has an '_embedder.yaml' file with an 'embedder_libs' key two things happen:
1) We do not use the DartUriResolver to resolve dart: libraries.
2) We use the EmbedderUriResolver to resolve all dart: libraries
- If multiple packages have an '_embedder.yaml' file we merge them.
- This might not be the final behaviour that we want but I'm not sure how to surface errors to the end user.
- The '_embedder.yaml' file has a top level key 'embedder_libs' which is a map from dart: library uri to source path. Other keys are ignored by the EmbedderUriResolver.
- Unit tests for analyzer
- Integration test for analysis_server.
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1437893003 .
Its "in stack" percent is down from 2.82% to 0.16% now.
This makes total MDL project analysis about 3% faster.
Also exchange the 'suffix' arguments to make them consistent with the parent/child order everywhere else.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1444983002 .
The big change here is to ensure FunctionTypeImpl.typeArguments is always initialized to match the parameters. This was previously the case, because we'd explicitly use the class's type parameters. With generic methods, we can no longer rely exclusively on that source of type parameters.
We take advantage of enclosingElement to compute typeParameters from all containing scopes that can have them. By tracking all of the typeParameters, this allows substitution to work later.
Adds a few very basic tests. Please note that generic methods are not ready to use yet.
In particular this doesn't yet do the correct substitutions in StaticTypeAnalyzer. It also doesn't include (mostly done) inference to infer type parameters from the argument types. Further, discovered a missing feature from the previous parser CL. And finally, it doesn't include the kind of ErrorVerifier checks we'll likely need.
R=brianwilkerson@google.com, leafp@google.com
Review URL: https://codereview.chromium.org/1434983006 .
On Windows, absolute file URIs include a drive
letter (e.g. "file:///C:/foo.dart"). Added a helper function "absUri"
which generates the correct kind of absolute file URI for the platform.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1435153005 .
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 .