Skip to content

Commit

Permalink
pub get offline for scenario_app (flutter#27240)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnfield authored Jul 8, 2021
1 parent 6f00ff2 commit 8dd9194
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 54 deletions.
2 changes: 0 additions & 2 deletions ci/analyze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ analyze \
"$FLUTTER_DIR/testing/smoke_test_failure"

echo "Analyzing testing/dart..."
(cd "$FLUTTER_DIR/testing/dart" && "$PUB" get --offline)
analyze \
--packages="$FLUTTER_DIR/testing/dart/.dart_tool/package_config.json" \
--options "$FLUTTER_DIR/analysis_options.yaml" \
"$FLUTTER_DIR/testing/dart"

echo "Analyzing testing/scenario_app..."
(cd "$FLUTTER_DIR/testing/scenario_app" && "$PUB" get --offline)
analyze \
--packages="$FLUTTER_DIR/testing/scenario_app/.dart_tool/package_config.json" \
--options "$FLUTTER_DIR/analysis_options.yaml" \
Expand Down
34 changes: 33 additions & 1 deletion sky/packages/sky_engine/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,48 @@ group("copy_dart_sdk") {
]
}

generated_file("_embedder_yaml") {
outputs = [ "$root_gen_dir/dart-pkg/sky_engine/lib/_embedder.yaml" ]
contents = [
"# This file is generated by //flutter/sky/packages/sky_engine:_embedder_yaml",
"# Do not modify this file directly. Instead, update the build file.",
"",
"embedded_libs:",
" \"dart:async\": \"async/async.dart\"",
" \"dart:collection\": \"collection/collection.dart\"",
" \"dart:convert\": \"convert/convert.dart\"",
" \"dart:core\": \"core/core.dart\"",
" \"dart:developer\": \"developer/developer.dart\"",
" \"dart:ffi\": \"ffi/ffi.dart\"",
" \"dart:html\": \"html/html_dart2js.dart\"",
" \"dart:io\": \"io/io.dart\"",
" \"dart:isolate\": \"isolate/isolate.dart\"",
" \"dart:js\": \"js/js.dart\"",
" \"dart:js_util\": \"js_util/js_util.dart\"",
" \"dart:math\": \"math/math.dart\"",
" \"dart:typed_data\": \"typed_data/typed_data.dart\"",
" \"dart:ui\": \"ui/ui.dart\"",
"",
" \"dart:_http\": \"_http/http.dart\"",
" \"dart:_interceptors\": \"_interceptors/interceptors.dart\"",
" # The _internal library is needed as some implementations bleed into the",
" # public API, e.g. List being Iterable by virtue of implementing",
" # EfficientLengthIterable. Not including this library yields analysis errors.",
" \"dart:_internal\": \"internal/internal.dart\"",
" \"dart:nativewrappers\": \"_empty.dart\"",
]
}

dart_pkg("sky_engine") {
sources = [
"LICENSE",
"README.md",
"lib/_embedder.yaml",
"lib/_empty.dart",
"pubspec.yaml",
]

deps = [
":_embedder_yaml",
":copy_dart_sdk",
":copy_dart_ui",
]
Expand Down
37 changes: 20 additions & 17 deletions sky/packages/sky_engine/lib/_embedder.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# This file is suitable for use within the tree. A different _embedder.yaml
# is generated by the BUILD.gn in this directory. Changes here must be
# mirrored there.
embedded_libs:
"dart:async": "async/async.dart"
"dart:collection": "collection/collection.dart"
"dart:convert": "convert/convert.dart"
"dart:core": "core/core.dart"
"dart:developer": "developer/developer.dart"
"dart:ffi": "ffi/ffi.dart"
"dart:html": "html/html_dart2js.dart"
"dart:io": "io/io.dart"
"dart:isolate": "isolate/isolate.dart"
"dart:js": "js/js.dart"
"dart:js_util": "js_util/js_util.dart"
"dart:math": "math/math.dart"
"dart:typed_data": "typed_data/typed_data.dart"
"dart:ui": "ui/ui.dart"
"dart:async": "../../../../../third_party/dart/sdk/lib/async/async.dart"
"dart:collection": "../../../../../third_party/dart/sdk/lib/collection/collection.dart"
"dart:convert": "../../../../../third_party/dart/sdk/lib/convert/convert.dart"
"dart:core": "../../../../../third_party/dart/sdk/lib/core/core.dart"
"dart:developer": "../../../../../third_party/dart/sdk/lib/developer/developer.dart"
"dart:ffi": "../../../../../third_party/dart/sdk/lib/ffi/ffi.dart"
"dart:html": "../../../../../third_party/dart/sdk/lib/html/html_dart2js.dart"
"dart:io": "../../../../../third_party/dart/sdk/lib/io/io.dart"
"dart:isolate": "../../../../../third_party/dart/sdk/lib/isolate/isolate.dart"
"dart:js": "../../../../../third_party/dart/sdk/lib/js/js.dart"
"dart:js_util": "../../../../../third_party/dart/sdk/lib/js_util/js_util.dart"
"dart:math": "../../../../../third_party/dart/sdk/lib/math/math.dart"
"dart:typed_data": "../../../../../third_party/dart/sdk/lib/typed_data/typed_data.dart"
"dart:ui": "../../../../lib/ui/ui.dart"

"dart:_http": "_http/http.dart"
"dart:_interceptors": "_interceptors/interceptors.dart"
"dart:_http": "../../../../../third_party/dart/sdk/lib/_http/http.dart"
"dart:_interceptors": "../../../../../third_party/dart/sdk/lib/_interceptors/interceptors.dart"
# The _internal library is needed as some implementations bleed into the
# public API, e.g. List being Iterable by virtue of implementing
# EfficientLengthIterable. Not including this library yields analysis errors.
"dart:_internal": "internal/internal.dart"
"dart:_internal": "../../../../../third_party/dart/sdk/lib/internal/internal.dart"
"dart:nativewrappers": "_empty.dart"
5 changes: 2 additions & 3 deletions testing/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ environment:
dependencies:
litetest: any
path: any
sky_engine: any
vm_service: any

dependency_overrides:
Expand All @@ -35,8 +36,6 @@ dependency_overrides:
spirv:
path: ../../lib/spirv
sky_engine:
path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_engine
sky_services:
path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_services
path: ../../sky/packages/sky_engine
vm_service:
path: ../../../third_party/dart/pkg/vm_service
6 changes: 0 additions & 6 deletions testing/scenario_app/compile_android_aot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then
exit 1
fi

PUB="$HOST_TOOLS/dart-sdk/bin/pub"
PUB_VERSION="$("$PUB" --version)"
echo "Using Pub ${PUB_VERSION} from $PUB"

(cd "$SCRIPT_DIR"; "$PUB" get --offline)

echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS."

OUTDIR="$SCRIPT_DIR/build/android"
Expand Down
6 changes: 0 additions & 6 deletions testing/scenario_app/compile_android_jit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then
exit 1
fi

PUB="$HOST_TOOLS/dart-sdk/bin/pub"
PUB_VERSION="$("$PUB" --version)"
echo "Using Pub $PUB_VERSION from $PUB"

"$PUB" get --offline

echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS."

OUTDIR="$SCRIPT_DIR/build/app"
Expand Down
6 changes: 0 additions & 6 deletions testing/scenario_app/compile_ios_aot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then
exit 1
fi

PUB="$HOST_TOOLS/dart-sdk/bin/pub"
PUB_VERSION=$("$PUB" --version)
echo "Using Pub $PUB_VERSION from $PUB"

"$PUB" get --offline

echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS."

OUTDIR="$SCRIPT_DIR/build/ios"
Expand Down
6 changes: 0 additions & 6 deletions testing/scenario_app/compile_ios_jit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ if [[ ! -d "$DEVICE_TOOLS" ]]; then
exit 1
fi

PUB="$HOST_TOOLS/dart-sdk/bin/pub"
PUB_VERSION=$("$PUB" --version)
echo "Using Pub $PUB_VERSION from $PUB"

"$PUB" get --offline

echo "Using dart from $HOST_TOOLS, gen_snapshot from $DEVICE_TOOLS."

OUTDIR="$SCRIPT_DIR/build/ios"
Expand Down
8 changes: 1 addition & 7 deletions testing/scenario_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,14 @@ environment:
# 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, or //third_party/pkg

# These are for convenience during local development. Changing them will not
# impact the build.
dependencies:
sky_engine: any
sky_services: any
vector_math: any

dependency_overrides:
meta:
path: ../../../third_party/dart/pkg/meta
sky_engine:
path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_engine
sky_services:
path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_services
path: ../../sky/packages/sky_engine
vector_math:
path: ../../../third_party/pkg/vector_math
2 changes: 2 additions & 0 deletions tools/pub_get_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
os.path.join("src", "flutter", "ci"),
os.path.join("src", "flutter", "flutter_frontend_server"),
os.path.join("src", "flutter", "testing", "benchmark"),
os.path.join("src", "flutter", "testing", "dart"),
os.path.join("src", "flutter", "testing", "litetest"),
os.path.join("src", "flutter", "testing", "scenario_app"),
os.path.join("src", "flutter", "testing", "smoke_test_failure"),
os.path.join("src", "flutter", "testing", "symbols"),
os.path.join("src", "flutter", "tools", "android_lint"),
Expand Down

0 comments on commit 8dd9194

Please sign in to comment.