fb0d56b81b
Introduce explicit origin flags on ConstructorElement and its fragment (isOriginDeclaration, isOriginImplicitDefault, isOriginMixinApplication) and deprecate isSynthetic in favor of these. Define isSynthetic as the inverse of isOriginDeclaration to preserve the legacy meaning while encouraging clients to use the more precise origin predicates. Eventually `Element.isSynthetic` also will be deprecated and removed. This CL is a step toward this goal, migrating what is possible with new flags. Update analyzer internals to rely on the new origin flags when checking for non-factory generative constructors, building synthetic constructors for mixin applications, and walking constructor chains in index/search logic. Only constructors with an origin declaration are now treated as declarations, and nonSynthetic is defined in terms of origin declarations rather than synthetic-ness. Add corresponding origin descriptors to the manifest enum and bump AnalysisDriver.DATA_VERSION. Adjust analysis server refactorings and fixes to distinguish implicit default constructors from other synthetic constructors. Code paths that previously checked isSynthetic for default constructors now check isOriginImplicitDefault, and mixin-application traversal uses isOriginMixinApplication. Overall, this change removes the overloaded semantics of isSynthetic, makes constructor provenance explicit, and prepares the element model for future DeCo and primary-constructor scenarios without relying on brittle synthetic heuristics. Change-Id: I8568bdfe478867af313a4d13afe1f2859394831b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465201 Reviewed-by: Paul Berry <paulberry@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
analysis_server
A long-running process that provides analysis results to other tools.
The analysis server is designed to provide on-going analysis of one or more code bases as those code bases are changing.
Using the server
The analysis server is not intended to be used stand-alone, and therefore does not have a human-friendly user interface.
Clients (typically tools, such as an editor) are expected to run the analysis
server in a separate process and communicate with it using a JSON protocol. The
original protocol is specified in the file analysis_server/doc/api.html
and Language Server Protocol support is documented in
tool/lsp_spec/README.md.
Features and bugs
Please file feature requests and bugs at the issue tracker.