diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json new file mode 100644 index 0000000000000..9f37f40f699fd --- /dev/null +++ b/.dart_tool/package_config.json @@ -0,0 +1,143 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "args", + "rootUri": "../../third_party/dart/third_party/pkg/args", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "async", + "rootUri": "../../third_party/dart/third_party/pkg/async", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "async_helper", + "rootUri": "../../third_party/dart/pkg/async_helper", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "collection", + "rootUri": "../../third_party/dart/third_party/pkg/collection", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "engine_build_configs", + "rootUri": "../tools/pkg/engine_build_configs", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "engine_repo_tools", + "rootUri": "../tools/pkg/engine_repo_tools", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "engine_tool", + "rootUri": "../tools/engine_tool", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "expect", + "rootUri": "../../third_party/dart/pkg/expect", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "file", + "rootUri": "../../third_party/dart/third_party/pkg/file/packages/file", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "litetest", + "rootUri": "../testing/litetest", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "logging", + "rootUri": "../../third_party/dart/third_party/pkg/logging", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "meta", + "rootUri": "../../third_party/dart/pkg/meta", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "path", + "rootUri": "../../third_party/dart/third_party/pkg/path", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "platform", + "rootUri": "../third_party/pkg/platform", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "process", + "rootUri": "../third_party/pkg/process", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "process_fakes", + "rootUri": "../tools/pkg/process_fakes", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "process_runner", + "rootUri": "../third_party/pkg/process_runner", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "smith", + "rootUri": "../../third_party/dart/pkg/smith", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "source_span", + "rootUri": "../../third_party/dart/third_party/pkg/source_span", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "string_scanner", + "rootUri": "../../third_party/dart/third_party/pkg/string_scanner", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "term_glyph", + "rootUri": "../../third_party/dart/third_party/pkg/term_glyph", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "yaml", + "rootUri": "../../third_party/dart/third_party/pkg/yaml", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "_engine", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.3" + } + ] +} diff --git a/.gitignore b/.gitignore index 10440a5444ad9..abd84698f229f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# commonly generated files +# Commonly generated files *.pyc *~ .*.sw? @@ -8,7 +8,6 @@ .classpath .clangd/ .cproject -.dart_tool .gdb_history .checkstyle .gdbinit @@ -28,6 +27,14 @@ pubspec.lock docs/doxygen/ xcuserdata +# Typical projects would hide all of .dart_tool, but we're treating it as a +# mono repository to resolve packages across the entire repository, so hide +# .dart_tool but allow the .dart_tool/package_config.json file. +.dart_tool/** +!.dart_tool/package_config.json +# But ignore the .dart_tool directory in any subdirectories. +*/**/.dart_tool/ + # Miscellaneous *.class *.lock @@ -56,7 +63,6 @@ xcuserdata # Flutter/Dart/Pub related **/doc/api/ -.dart_tool/ .flutter-plugins .flutter-plugins-dependencies .packages diff --git a/analysis_options.yaml b/analysis_options.yaml index d7c1e8b4dd9d5..30a9edf5707c9 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -16,6 +16,17 @@ analyzer: deprecated_member_use: ignore deprecated_member_use_from_same_package: ignore exclude: # DIFFERENT FROM FLUTTER/FLUTTER + # Directories that might have Dart code, but aren't part of the engine, i.e. + # vended directories or code that is copied by tooling. + - prebuilts/ + - third_party/ + # Directories that have Dart code, but the Dart code isn't resolvable by the + # analyzer, i.e. it uses custom embedding or other tooling that the analyzer + # can't be aware of. + - examples/ + - impeller/ + - runtime/ + - shell/ # Fixture depends on dart:ui and raises false positives. - flutter_frontend_server/test/fixtures/lib/main.dart diff --git a/bin/et b/bin/et index a3c30df0241d9..806060ae2bc66 100755 --- a/bin/et +++ b/bin/et @@ -58,9 +58,6 @@ PLATFORM="${OS}-${CPU}" DART_SDK_DIR="${ENGINE_DIR}/prebuilts/${PLATFORM}/dart-sdk" DART="${DART_SDK_DIR}/bin/dart" -if [ ! -d "${ENGINE_DIR}/tools/engine_tool/.dart_tool" ]; then - echo "You must run 'gclient sync -D' before using this tool." - exit 1 -fi - -"${DART}" --disable-dart-dev "${ENGINE_DIR}/tools/engine_tool/bin/et.dart" "$@" +"${DART}" \ + --disable-dart-dev \ + "${ENGINE_DIR}/tools/engine_tool/bin/et.dart" "$@" diff --git a/tools/engine_tool/pubspec.yaml b/tools/engine_tool/pubspec.yaml deleted file mode 100644 index 1fc8f9fb25552..0000000000000 --- a/tools/engine_tool/pubspec.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -name: engine_tool -publish_to: none -environment: - sdk: '>=3.2.0-0 <4.0.0' - -# Do not add any dependencies that require more than what is provided in -# //third_party/pkg, //third_party/dart/pkg, or -# //third_party/dart/third_party/pkg. In particular, package:test is not usable -# here. - -# If you do add packages here, make sure you can run `pub get --offline`, and -# check the .packages and .package_config to make sure all the paths are -# relative to this directory into //third_party/dart - -dependencies: - args: any - engine_build_configs: - path: ../pkg/engine_build_configs - engine_repo_tools: - path: ../pkg/engine_repo_tools - file: any - logging: any - meta: any - path: any - platform: any - process_runner: any - -dev_dependencies: - async_helper: any - expect: any - litetest: any - process_fakes: - path: ../pkg/process_fakes - smith: any - -dependency_overrides: - args: - path: ../../../third_party/dart/third_party/pkg/args - async: - path: ../../../third_party/dart/third_party/pkg/async - async_helper: - path: ../../../third_party/dart/pkg/async_helper - collection: - path: ../../../third_party/dart/third_party/pkg/collection - expect: - path: ../../../third_party/dart/pkg/expect - file: - path: ../../../third_party/dart/third_party/pkg/file/packages/file - litetest: - path: ../../testing/litetest - logging: - path: ../../../third_party/dart/third_party/pkg/logging - meta: - path: ../../../third_party/dart/pkg/meta - path: - path: ../../../third_party/dart/third_party/pkg/path - platform: - path: ../../third_party/pkg/platform - process: - path: ../../third_party/pkg/process - process_runner: - path: ../../third_party/pkg/process_runner - smith: - path: ../../../third_party/dart/pkg/smith - source_span: - path: ../../../third_party/dart/third_party/pkg/source_span - string_scanner: - path: ../../../third_party/dart/third_party/pkg/string_scanner - term_glyph: - path: ../../../third_party/dart/third_party/pkg/term_glyph - yaml: - path: ../../../third_party/dart/third_party/pkg/yaml diff --git a/tools/pub_get_offline.py b/tools/pub_get_offline.py index f77e59d7d9577..4fc683465c1a4 100644 --- a/tools/pub_get_offline.py +++ b/tools/pub_get_offline.py @@ -38,7 +38,6 @@ os.path.join(ENGINE_DIR, 'tools', 'compare_goldens'), os.path.join(ENGINE_DIR, 'tools', 'const_finder'), os.path.join(ENGINE_DIR, 'tools', 'dir_contents_diff'), - os.path.join(ENGINE_DIR, 'tools', 'engine_tool'), os.path.join(ENGINE_DIR, 'tools', 'gen_web_locale_keymap'), os.path.join(ENGINE_DIR, 'tools', 'githooks'), os.path.join(ENGINE_DIR, 'tools', 'golden_tests_harvester'),