| commit | 3833a7bd3ecd525eedb26b9bd22755d7870c9190 | [log] [tgz] |
|---|---|---|
| author | Danny Tuppeny <danny@tuppeny.com> | Tue May 28 19:10:40 2024 +0000 |
| committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue May 28 19:10:40 2024 +0000 |
| tree | 59971318f6bfd095377335bc684ae6a02b92e5f4 | |
| parent | 500a8c0a72851ac95f60685e66df035246ca97c6 [diff] |
[dartdev]/[analysis_server] Report server errors to "dart analyze" to prevent misleading output for parse/analysis exceptions If analysis failed due to an exception, "dart analyze" may still report "no issues found" because it didn't get any server errors. It didn't get server errors for a number of reasons: 1. Analysis errors were silent (see https://github.com/dart-lang/sdk/issues/39284) 2. `server` in ErrorNotifier was always `null` because the code that set it did so too early 3. `ErrorNotifier` was never added to the instrumentation service, so never got called anyway Additionally, "dart analyze" printed "No errors found!" even if server errors occurred (as long as the server didn't crash). This change fixes up the server reference in ErrorNotifier, adds it to the instrumentation service and uses a new flag ("--disable-silent-analysis-exceptions") to allow opting-in to getting analysis errors to the client. It also updates "dart analyze" to not print "No errors found!" (and to not use a 0 exit code) when server errors occur. Because this change "fixes" ErrorNotifier, it's possible that with this change clients will now get additional error notifications (non-silent exceptions that were being dropped previously) which could result in users seeing more errors - but presumably errors that should have been reported before anyway. Fixes https://github.com/dart-lang/sdk/issues/49931 Change-Id: I4948117c78b8f382550b7641076de443250bba6b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358902 Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Dart is:
Approachable: Develop with a strongly typed programming language that is consistent, concise, and offers modern language features like null safety and patterns.
Portable: Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend. Compile to JavaScript or WebAssembly for the web.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app. Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents in our repo at docs.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
Future plans for Dart are included in the combined Dart and Flutter roadmap on the Flutter wiki.