From 17a7f513c3e6be35dca53906b79a7be58369e260 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 29 Nov 2018 23:33:39 +0000 Subject: [PATCH] Fix up pubspec for pkg:compiler Removed unused dependencies Correctly reference repo packages via dependency_overrides Fix pubspecs for pkg: js_ast, js_runtime, sdk_library_metadata Change-Id: I2077814f733c299dca7afe3f5ab4b380c2c886e4 Reviewed-on: https://dart-review.googlesource.com/c/85660 Commit-Queue: Kevin Moore Reviewed-by: Sigmund Cherem --- pkg/compiler/.gitignore | 1 + pkg/compiler/README.md | 3 - pkg/compiler/pubspec.yaml | 106 ++++++++++++------ pkg/js_ast/pubspec.yaml | 10 +- sdk/lib/_internal/js_runtime/pubspec.yaml | 4 +- .../sdk_library_metadata/pubspec.yaml | 4 +- 6 files changed, 81 insertions(+), 47 deletions(-) diff --git a/pkg/compiler/.gitignore b/pkg/compiler/.gitignore index 16a17247aa4..52a27d1f9ca 100644 --- a/pkg/compiler/.gitignore +++ b/pkg/compiler/.gitignore @@ -1 +1,2 @@ +.dart_tool/ .packages diff --git a/pkg/compiler/README.md b/pkg/compiler/README.md index 16abf7bc913..755369ea619 100644 --- a/pkg/compiler/README.md +++ b/pkg/compiler/README.md @@ -487,9 +487,6 @@ functionality is publicly exposed. * sdk patch files are hardcoded in the codebase in `lib/src/js_backend/backend.dart` (see `_patchLocations`). - * package resolution is specified with a `.packages` file, which is parsed - using the `package_config` package. - * `lib/src/resolved_uri_translator.dart`: has the logic to translate all these URIs when they are encountered by the library loader. diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml index 22984733879..fed2fe2d5d5 100644 --- a/pkg/compiler/pubspec.yaml +++ b/pkg/compiler/pubspec.yaml @@ -1,53 +1,85 @@ # This pubspec is currently mainly used to make it easier to develop on dart2js # by making it a standalone package. name: compiler -#version: do-not-upload +publish_to: none +environment: + sdk: '>=2.1.0 <3.0.0' + +# NOTE: `pub get / pub upgrade` are generally not needed when working on this +# package. The `.packages` file in the repository root will be used by default. dependencies: - package_config: '>=0.1.1 <2.0.0' - pub_semver: ^1.2.1 - js: - path: ../js + # Published packages - repo version ensured via dependency_overrides + collection: any + crypto: any + dart2js_info: any + front_end: any + kernel: any + + # Unpublished packages that can be used via path dependency js_ast: path: ../js_ast js_runtime: path: ../../sdk/lib/_internal/js_runtime - kernel: - path: ../../pkg/kernel sdk_library_metadata: path: ../../sdk/lib/_internal/sdk_library_metadata - dart2js_info: - path: ../../third_party/pkg/dart2js_info - front_end: - path: ../front_end - crypto: - path: ../../third_party/pkg/crypto + +dev_dependencies: + # Published packages - repo version ensured via dependency_overrides + args: any + dependency_overrides: + # Packages with source in the SDK front_end: path: ../front_end - analyzer: - path: ../analyzer kernel: path: ../../pkg/kernel + meta: + path: ../meta -# Uncomment if running gclient, so you can depend directly on the downloaded -# versions of dart2js's transitive dependencies: -# -# dependency_overrides: -# package_config: -# path: ../../third_party/pkg_tested/package_config -# path: -# path: ../../third_party/pkg/path -# charcode: -# path: ../../third_party/pkg/charcode -# collection: -# path: ../../third_party/pkg/collection -# crypto: -# path: ../../third_party/pkg/crypto -# http_parser: -# path: ../../third_party/pkg/http_parser -# args: -# path: ../../third_party/pkg/args -# shelf: -# path: ../../third_party/pkg/shelf -# yaml: -# path: ../../third_party/pkg/yaml + # Packages brought in via DEPS + args: + path: ../../third_party/pkg/args + async: + path: ../../third_party/pkg/async + charcode: + path: ../../third_party/pkg/charcode + collection: + path: ../../third_party/pkg/collection + convert: + path: ../../third_party/pkg/convert + crypto: + path: ../../third_party/pkg/crypto + dart2js_info: + path: ../../third_party/pkg/dart2js_info + fixnum: + path: ../../third_party/pkg/fixnum + http_parser: + path: ../../third_party/pkg/http_parser + matcher: + path: ../../third_party/pkg/matcher + mime: + path: ../../third_party/pkg/mime + package_config: + path: ../../third_party/pkg_tested/package_config + path: + path: ../../third_party/pkg/path + protobuf: + path: ../../third_party/pkg/protobuf + quiver: + path: ../../third_party/pkg/quiver + shelf: + path: ../../third_party/pkg/shelf + shelf_static: + path: ../../third_party/pkg/shelf_static + source_span: + path: ../../third_party/pkg/source_span + stack_trace: + path: ../../third_party/pkg/stack_trace + stream_channel: + path: ../../third_party/pkg/stream_channel + string_scanner: + path: ../../third_party/pkg/string_scanner + typed_data: + path: ../../third_party/pkg/typed_data + yaml: + path: ../../third_party/pkg/yaml diff --git a/pkg/js_ast/pubspec.yaml b/pkg/js_ast/pubspec.yaml index 00ce6472eae..8db366ac810 100644 --- a/pkg/js_ast/pubspec.yaml +++ b/pkg/js_ast/pubspec.yaml @@ -1,8 +1,8 @@ name: js_ast -author: Dart Team -description: Library creating and printing JavaScript ASTs. -homepage: http://www.dartlang.org +publish_to: none + +environment: + sdk: '>=2.0.0 <3.0.0' + dev_dependencies: test: ^1.3.4 -environment: - sdk: ">=0.8.10+6 <2.0.0" diff --git a/sdk/lib/_internal/js_runtime/pubspec.yaml b/sdk/lib/_internal/js_runtime/pubspec.yaml index c8fa8098caf..821aaacda74 100644 --- a/sdk/lib/_internal/js_runtime/pubspec.yaml +++ b/sdk/lib/_internal/js_runtime/pubspec.yaml @@ -1,4 +1,6 @@ # Note: This package is not meant to be uploaded to pub. This file is used to # make it easier to develop on dart2js. name: js_runtime -# version: do-not-upload +publish_to: none +environment: + sdk: '>=2.0.0 <3.0.0' diff --git a/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml b/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml index 4d093742797..08b5518b032 100644 --- a/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml +++ b/sdk/lib/_internal/sdk_library_metadata/pubspec.yaml @@ -1,4 +1,6 @@ # Note: This package is not meant to be uploaded to pub. This file is used to # make it easer to depend on libraries.dart from sdk packages like dart2js. name: sdk_library_metadata -# version: do-not-upload +publish_to: none +environment: + sdk: '>=2.0.0 <3.0.0'