sdk
sdk copied to clipboard
The Dart SDK, including the VM, dart2js, core libraries, and more.
Calling [exit(int)](https://api.dartlang.org/stable/1.22.1/dart-io/exit.html) should be treated by the analyzer as such. Example: ```Dart import 'dart:io'; String test(bool keepRunning) { if (keepRunning) { return 'OK'; } exit(0); print('should not happen'); } ```...
The `@alwaysThrows` annotation can be replaced with a return type of `Never`. A `@deprecated` annotation on `alwaysThrows` would report for pre-null safe code, so we should not do that. Instead,...
All blocks after the first if, are dead code. ``` bool _isStatic(Element element) { if (element is ClassMemberElement) { return element.isStatic; } else if (element is ClassMemberElement) { return element.isStatic;...
Given a file with the following: ``` void f() { print(true || false); print(true && true); } ``` The first line is flagged as having dead code, but the second...
Observed on the following Dart version: ```sh $ dart --version Dart VM version: 2.5.0-dev.3.0.flutter-35382f9b14 (Wed Aug 28 18:50:51 2019 +0000) on "macos_x64" ``` ``` FileSystemException: Deletion failed, path = '/private/var/folders/dy/cv4xnlnn7sb_4bz47wvmdwjw003g3j/T/file_test_JGEQQ7'...
Use case is to list the contents of a directory, and skip any "hidden" files as defined on the current platform (dot files in Linux and macOS, hidden Windows files,...
I have sought various ways and tried various ways. There is still this problem. The following is a screenshot of my system parameter information and error reporting。 Operating system: Windows...
In dart2wasm, we want to add a `@pragma("wasm:entry-point")` to the `Symbol` constructor. If we [do this](https://dart-review.googlesource.com/c/sdk/+/252700), the build hangs. A debug build [reports a deadlock](https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8807638277495869441/+/u/build_dart/stdout). It seems that the canonicalization...
Currently our production tool stacks, webdev and bazel, implement their own platform restrictions for core library imports. The check is done for individual modules. When compiling with dart2js for running...
Found 10 file excluded from sound null safety: - pkg/frontend_server/bin/frontend_server_starter.dart - pkg/frontend_server/lib/compute_kernel.dart - pkg/frontend_server/lib/frontend_server.dart - pkg/frontend_server/lib/src/javascript_bundle.dart - pkg/frontend_server/lib/src/strong_components.dart - pkg/frontend_server/test/frontend_server_flutter_suite.dart - pkg/frontend_server/test/frontend_server_flutter.dart - pkg/frontend_server/test/frontend_server_test.dart - pkg/frontend_server/test/src/javascript_bundle_test.dart - pkg/frontend_server/test/src/strong_components_test.dart See https://github.com/dart-lang/sdk/issues/49169...