dart-sdk/.packages
Nate Bosch 833c70be61 Add the first Kernel check for invalid JS interop
Add a visitor that checks for invalid JS interop usage and reports
diagnostics. Wire the visitor up to the `DevCompilerTarget` and `Dart2jsTarget`.

- Add a message without an analyzer code for this error. In the long term we may
  want to also add it to analyzer.
- Add a new package `_js_interop_checks` to share the kernel visitor between
  dart2js and ddc. Some of the code is copied from ddc, and in the long term we
  can centralize more of the detection of JS interop annotations to this
  package.
- Implement the first check to detect definitions of `operator []` or
  `operator []=` which are not allowed in JS interop classes.

Change-Id: I095a4b7f4732796dbc3cae55b32d5fc9bcdbd798
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130733
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-28 22:39:10 +00:00

120 lines
4.7 KiB
Plaintext

# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
#
# .package file containing links to all packages in /pkg, and checked out
# by DEPS into /third_party/pkg and /third_party/pkg_tested.
# Please update this file if you add a package to DEPS or /pkg
#
_fe_analyzer_shared:pkg/_fe_analyzer_shared/lib
_js_interop_checks:pkg/_js_interop_checks/lib
analysis_server:pkg/analysis_server/lib
analysis_server_client:pkg/analysis_server_client/lib
analysis_tool:pkg/analysis_tool/lib
analyzer:pkg/analyzer/lib
analyzer_cli:pkg/analyzer_cli/lib
analyzer_fe_comparison:pkg/analyzer_fe_comparison/lib
analyzer_plugin:pkg/analyzer_plugin/lib
args:third_party/pkg/args/lib
async:third_party/pkg/async/lib
async_helper:pkg/async_helper/lib
bazel_worker:third_party/pkg/bazel_worker/lib
benchmark_harness:third_party/pkg/benchmark_harness/lib
boolean_selector:third_party/pkg/boolean_selector/lib
build_integration:pkg/build_integration/lib
charcode:third_party/pkg/charcode/lib
cli_util:third_party/pkg/cli_util/lib
collection:third_party/pkg/collection/lib
compiler:pkg/compiler/lib
convert:third_party/pkg/convert/lib
crypto:third_party/pkg/crypto/lib
csslib:third_party/pkg/csslib/lib
dart2js_info:third_party/pkg/dart2js_info/lib
dart2js_tools:pkg/dart2js_tools/lib
dart2native:pkg/dart2native/lib
dart_internal:pkg/dart_internal/lib
dart_style:third_party/pkg_tested/dart_style/lib
dartdev:pkg/dartdev/lib
dartdoc:third_party/pkg/dartdoc/lib
dartfix:pkg/dartfix/lib
dev_compiler:pkg/dev_compiler/lib
diagnostic:pkg/diagnostic/lib
expect:pkg/expect/lib
ffi:third_party/pkg/ffi/lib
fixnum:third_party/pkg/fixnum/lib
frontend_server:pkg/frontend_server/lib
front_end:pkg/front_end/lib
gardening:tools/gardening/lib
glob:third_party/pkg/glob/lib
html:third_party/pkg/html/lib
http:third_party/pkg/http/lib
http_io:third_party/pkg_tested/http_io/lib
http_multi_server:third_party/pkg/http_multi_server/lib
http_parser:third_party/pkg/http_parser/lib
http_retry:third_party/pkg/http_retry/lib
http_throttle:third_party/pkg/http_throttle/lib
intl:third_party/pkg/intl/lib
js:pkg/js/lib
js_ast:pkg/js_ast/lib
js_runtime:sdk/lib/_internal/js_runtime/lib
json_rpc_2:third_party/pkg/json_rpc_2/lib
kernel:pkg/kernel/lib
linter:third_party/pkg/linter/lib
logging:third_party/pkg/logging/lib
markdown:third_party/pkg/markdown/lib
matcher:third_party/pkg/matcher/lib
meta:pkg/meta/lib
mime:third_party/pkg/mime/lib
mockito:third_party/pkg/mockito/lib
modular_test:pkg/modular_test/lib
mustache:third_party/pkg/mustache/lib
native_stack_traces:pkg/native_stack_traces/lib
nnbd_migration:pkg/nnbd_migration/lib
oauth2:third_party/pkg/oauth2/lib
observatory:runtime/observatory/lib
observatory_test_package:runtime/observatory/tests/service/observatory_test_package
package_config:third_party/pkg_tested/package_config/lib
package_resolver:third_party/pkg_tested/package_resolver/lib
path:third_party/pkg/path/lib
pedantic:third_party/pkg/pedantic/lib
pool:third_party/pkg/pool/lib
protobuf:third_party/pkg/protobuf/protobuf/lib
pub:third_party/pkg/pub/lib
pub_semver:third_party/pkg/pub_semver/lib
quiver:third_party/pkg/quiver/lib
resource:third_party/pkg/resource/lib
sdk_library_metadata:sdk/lib/_internal/sdk_library_metadata/lib
shelf:third_party/pkg/shelf/lib
shelf_packages_handler:third_party/pkg/shelf_packages_handler/lib
shelf_static:third_party/pkg/shelf_static/lib
shelf_web_socket:third_party/pkg/shelf_web_socket/lib
smith:pkg/smith/lib
source_map_stack_trace:third_party/pkg/source_map_stack_trace/lib
sourcemap_testing:pkg/sourcemap_testing/lib
source_maps:third_party/pkg/source_maps/lib
source_span:third_party/pkg/source_span/lib
stack_trace:third_party/pkg/stack_trace/lib
status_file:pkg/status_file/lib
stream_channel:third_party/pkg/stream_channel/lib
string_scanner:third_party/pkg/string_scanner/lib
telemetry:pkg/telemetry/lib
term_glyph:third_party/pkg/term_glyph/lib
test:third_party/pkg/test/pkgs/test/lib
test_api:third_party/pkg/test/pkgs/test_api/lib
test_core:third_party/pkg/test/pkgs/test_core/lib
test_descriptor:third_party/pkg/test_descriptor/lib
test_process:third_party/pkg/test_process/lib
test_reflective_loader:third_party/pkg/test_reflective_loader/lib
test_runner:pkg/test_runner/lib
testing:pkg/testing/lib
tflite_native:third_party/pkg/tflite_native/lib
typed_data:third_party/pkg/typed_data/lib
unittest:third_party/pkg/unittest/lib
usage:third_party/pkg/usage/lib
vm:pkg/vm/lib
vm_service:pkg/vm_service/lib
watcher:third_party/pkg/watcher/lib
web_components:third_party/pkg/web_components/lib
web_socket_channel:third_party/pkg/web_socket_channel/lib
yaml:third_party/pkg/yaml/lib