dart-sdk/pkg
Alexander Markov 9c190c5e00 [vm/aot/tfa] Tree-shake instance fields with initializers
In order to simplify removal of instance fields with initializers which
may have side effects, such field initializers are moved to constructor
initializer lists before type flow analysis.

In case of multiple generative non-redirecting constructors AST of
field initializers is cloned. Moving and cloning of initializers is
performed before the analysis to avoid maintaining and spreading
inferred TFA information attached to AST nodes.

TEST=pkg/vm/testcases/transformations/type_flow/transformer/instance_fields_with_initializers_nnbd.dart
Fixes https://github.com/dart-lang/sdk/issues/46402

Change-Id: I4dc9c44c441ece5792f0748789ece117a2814581
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204943
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-06-28 18:33:43 +00:00
..
_fe_analyzer_shared [cfe] Support explicit instantiation 2021-06-25 14:47:45 +00:00
_js_interop_checks
analysis_server Cleanup invalid declarations of main, part 3 2021-06-28 18:14:21 +00:00
analysis_server_client [analysis_server] Enable multiline element descriptions for all hovers 2021-06-13 15:50:32 +00:00
analyzer Issue 46475. Make class Enum is optional, does not exist in older SDKs. 2021-06-28 18:20:53 +00:00
analyzer_cli [dartanalyzer] have the dartanalyzer command emit json output to stdout 2021-06-17 23:39:51 +00:00
analyzer_plugin Code complete the type in a DeclaredIdentifier even if the name is already present 2021-06-22 21:47:13 +00:00
analyzer_utilities
async_helper
build_integration
compiler [dart2js] Clean up tear-off code 2021-06-25 21:51:20 +00:00
dart2js_tools [dart2js] Updating deobfuscator function name resolution to support method definitions. 2021-06-24 23:12:42 +00:00
dart2native [pkg/dart2native] switch to use package:lints 2021-06-23 00:51:17 +00:00
dart_internal
dartdev [ CLI ] Fix IPv6 VM service support for standalone VM 2021-06-24 19:50:59 +00:00
dds [ CLI ] Fix IPv6 VM service support for standalone VM 2021-06-24 19:50:59 +00:00
dev_compiler [dartdevc] Updating eval tests that check for internal Future state. 2021-06-25 05:23:55 +00:00
diagnostic
expect
front_end [CFE] Third pass at internal test utility 2021-06-28 08:27:42 +00:00
frontend_server [flutter-frontend] Shard flutter-frontend bot 2021-06-15 08:11:19 +00:00
js
js_ast [dart2js] Realigning source entry boundaries for methods. 2021-06-14 18:34:33 +00:00
js_runtime [dart2js] Pass tear-off parameters in an object 2021-06-15 22:19:13 +00:00
kernel [vm, kernel] Cleanup support for old invocation nodes from the VM 2021-06-24 16:17:50 +00:00
language_versioning_2.7_test
meta
modular_test
native_stack_traces
nnbd_migration Migration: stop explicitly opting generated code into null safety. 2021-06-23 23:35:47 +00:00
scrape
smith
sourcemap_testing
status_file
telemetry deprecated field pubspec diagnostic 2021-06-22 17:26:09 +00:00
test_runner [infra] Add explicit gen_snapshot build target to macOS arm64 AOT builds 2021-06-25 19:35:32 +00:00
testing
vm [vm/aot/tfa] Tree-shake instance fields with initializers 2021-06-28 18:33:43 +00:00
vm_service [ VM / Service ] Add UserTag support to C-API and send UserTagChanged 2021-06-23 00:58:47 +00:00
vm_snapshot_analysis [pkg/vm_snapshot_analysis] switch to using package:lints 2021-06-24 17:07:48 +00:00
.gitignore
BUILD.gn
pkg.status
README.md

Package validation

The packages in pkg/ are automatically validated on the LUCI CI bots. The validation is largely done by the tools/package_deps package; it can be tested locally via:

dart tools/package_deps/bin/package_deps.dart

Packages which are published

There are several packages developed in pkg/ which are published to pub. Validation of these packages is particularly important because the pub tools are not used for these packages during development; we get our dependency versions from the DEPS file. Its very easy for the dependencies specified in a package's pubspec file to get out of date wrt the packages and versions actually used.

In order to better ensure we're publishing correct packages, we validate some properties of the pubspec files on our CI system. These validations include:

  • that the dependencies listed in the pubspec are used in the package
  • that all the packages used by the source are listed in the pubspec
  • that we don't use relative path deps to pkg/ or third_party/ packages

Packages which are not published

For packages in pkg/ which we do not intend to be published, we put the following comment in the pubspec.yaml file:

# This package is not intended for consumption on pub.dev. DO NOT publish.
publish_to: none

These pubspecs are still validated by the package validation tool. The contents are more informational as the pubspecs for these packages are not consumed by the pub tool or ecosystem.

We validate:

  • that the dependencies listed in the pubspec are used in the package
  • that all the packages used by the source are listed in the pubspec
  • that a reference to a pkg/ package is done via a relative path dependency