From 32e8b2d21cc4610f3021d6d4a6527ee78599ef0d Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 21 Apr 2022 13:46:00 -0700 Subject: [PATCH 1/5] build: remove dist/ Previously the dist/ contained archives built for either platform, that were then included by other targets to be used in the example apps. This had the benefit of demonstrating how the targets could be used in a bazel setup. The downside with this approach is that it was required to be non-hermetic, and made builds a 2 step process that you had to go through if you wanted to test framework changes. This is now removed and replaced with a more standard bazel setup where the example targets reference other targets in the build, removing the need for 2 steps. This also eliminates issues caused by manually editing the files in the dist/ directory, which bazel wouldn't pick up since it was non-hermetic. For android this is a no-op because we still continue to include the aar directly, for iOS this isn't currently possible because the `apple_static_framework_import` rule requires a list of files, which isn't possible to compute from the zip file produced by the `ios_static_framework` rule that is only meant for distribution. Instead the examples now depend on the `swift_library` directly, which is slightly different, but shouldn't be different enough to cause significant issues. Signed-off-by: Keith Smiley --- .bazelrc | 1 + .github/workflows/android_build.yml | 10 ++-- .github/workflows/ios_build.yml | 14 +++--- .github/workflows/release.yml | 38 +++++++-------- .gitignore | 10 +--- BUILD | 66 +++++--------------------- {dist => ci}/sonatype_nexus_upload.py | 18 +++---- dist/BUILD | 30 ------------ docs/root/start/building/building.rst | 12 ++--- examples/java/hello_world/BUILD | 2 +- examples/kotlin/hello_world/BUILD | 2 +- examples/objective-c/hello_world/BUILD | 2 +- examples/swift/async_await/BUILD | 2 +- examples/swift/hello_world/BUILD | 2 +- test/kotlin/apps/baseline/BUILD | 2 +- test/kotlin/apps/experimental/BUILD | 2 +- test/swift/apps/baseline/BUILD | 2 +- test/swift/apps/experimental/BUILD | 2 +- tools/check_format.sh | 2 +- 19 files changed, 65 insertions(+), 154 deletions(-) rename {dist => ci}/sonatype_nexus_upload.py (96%) delete mode 100644 dist/BUILD diff --git a/.bazelrc b/.bazelrc index 169f3f0b81..2320992de9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -19,6 +19,7 @@ build --ios_simulator_version=15.2 build --verbose_failures build --workspace_status_command=envoy/bazel/get_workspace_status build --xcode_version=13.2.1 +build --use_top_level_targets_for_symlinks # https://github.com/bazelbuild/rules_jvm_external/issues/445 build --repo_env=JAVA_HOME=../bazel_tools/jdk build --define disable_known_issue_asserts=true diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 1fd9f27a0c..ac63eb666d 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -19,7 +19,7 @@ jobs: id: check-cache with: key: aar-${{ github.sha }} - path: dist/envoy.aar + path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar name: 'Check cache' - run: echo "Found envoy.aar from previous run!" if: steps.check-cache.outputs.cache-hit == 'true' @@ -63,7 +63,7 @@ jobs: id: check-cache with: key: aar-${{ github.sha }} - path: dist/envoy.aar + path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar name: 'Download aar' - run: exit 1 if: steps.check-cache.outputs.cache-hit != 'true' @@ -106,7 +106,7 @@ jobs: id: check-cache with: key: aar-${{ github.sha }} - path: dist/envoy.aar + path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - name: 'Short-circuit' if: steps.check-cache.outputs.cache-hit != 'true' run: exit 1 @@ -149,7 +149,7 @@ jobs: id: check-cache with: key: aar-${{ github.sha }} - path: dist/envoy.aar + path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - name: 'Short-circuit' if: steps.check-cache.outputs.cache-hit != 'true' run: exit 1 @@ -192,7 +192,7 @@ jobs: id: check-cache with: key: aar-${{ github.sha }} - path: dist/envoy.aar + path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - name: 'Short-circuit' if: steps.check-cache.outputs.cache-hit != 'true' run: exit 1 diff --git a/.github/workflows/ios_build.yml b/.github/workflows/ios_build.yml index 528a240b82..5e8c48d3b0 100644 --- a/.github/workflows/ios_build.yml +++ b/.github/workflows/ios_build.yml @@ -19,7 +19,7 @@ jobs: id: check-cache with: key: framework-${{ github.sha }} - path: dist/Envoy.framework + path: bazel-bin/library/swift/ios_framework.zip name: 'Check cache' - run: echo "Found Envoy.framework from previous run!" if: steps.check-cache.outputs.cache-hit == 'true' @@ -31,7 +31,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | ./bazelw shutdown - ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //:ios_dist + ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //library/swift:ios_framework if: steps.check-cache.outputs.cache-hit != 'true' name: 'Build Envoy.framework distributable' swifthelloworld: @@ -49,7 +49,7 @@ jobs: id: check-cache with: key: framework-${{ github.sha }} - path: dist/Envoy.framework + path: bazel-bin/library/swift/ios_framework.zip name: 'Download framework' - run: exit 1 if: steps.check-cache.outputs.cache-hit != 'true' @@ -83,7 +83,7 @@ jobs: id: check-cache with: key: framework-${{ github.sha }} - path: dist/Envoy.framework + path: bazel-bin/library/swift/ios_framework.zip name: 'Download framework' - run: exit 1 if: steps.check-cache.outputs.cache-hit != 'true' @@ -117,7 +117,7 @@ jobs: id: check-cache with: key: framework-${{ github.sha }} - path: dist/Envoy.framework + path: bazel-bin/library/swift/ios_framework.zip name: 'Download framework' - run: exit 1 if: steps.check-cache.outputs.cache-hit != 'true' @@ -151,7 +151,7 @@ jobs: id: check-cache with: key: framework-${{ github.sha }} - path: dist/Envoy.framework + path: bazel-bin/library/swift/ios_framework.zip name: 'Download framework' - run: exit 1 if: steps.check-cache.outputs.cache-hit != 'true' @@ -185,7 +185,7 @@ jobs: id: check-cache with: key: framework-${{ github.sha }} - path: dist/Envoy.framework + path: bazel-bin/library/swift/ios_framework.zip name: 'Download framework' - run: exit 1 if: steps.check-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59a6ceaeb3..4f6725221d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: --remote_header="Authorization=Bearer $GITHUB_TOKEN" \ //:android_dist_ci - name: 'Tar artifacts' - run: tar -czvf envoy_android_aar_sources.tar.gz dist/envoy.aar dist/envoy-pom.xml dist/envoy-javadoc.jar dist/envoy-sources.jar + run: tar -czvf envoy_android_aar_sources.tar.gz bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar - uses: actions/upload-artifact@v2 with: name: envoy_android_aar_sources @@ -52,7 +52,7 @@ jobs: - uses: actions/download-artifact@v3 with: name: envoy_android_aar_sources - path: dist/ + path: . - run: tar -xvf dist/envoy_android_aar_sources.tar.gz - name: 'Configure envoy-bot git user' run: | @@ -75,10 +75,10 @@ jobs: gpg --passphrase $GPG_PASSPHRASE --batch --import signing-key shred signing-key - gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy.aar - gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy-pom.xml - gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy-javadoc.jar - gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab dist/envoy-sources.jar + gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar -o aar.asc + gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml -o xml.asc + gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar -o javadoc.asc + gpg --pinentry-mode=loopback --passphrase $GPG_PASSPHRASE -ab bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar -o sources.asc - name: 'Release to sonatype repository' env: READWRITE_USER: ${{ secrets.sonatype_user }} @@ -86,19 +86,19 @@ jobs: ENVOY_PROXY_PROFILE_ID: ${{ secrets.envoy_proxy_profile_id }} run: | current_release_tag=$(git describe --tags --abbrev=0 --exact-match) - python dist/sonatype_nexus_upload.py \ + python ci/sonatype_nexus_upload.py \ --profile_id=$ENVOY_PROXY_PROFILE_ID \ --version="${current_release_tag:1}" \ --files \ - dist/envoy.aar \ - dist/envoy-pom.xml \ - dist/envoy-sources.jar \ - dist/envoy-javadoc.jar \ + bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar \ + bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml \ + bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar \ + bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar \ --signed_files \ - dist/envoy-sources.jar.asc \ - dist/envoy.aar.asc \ - dist/envoy-pom.xml.asc \ - dist/envoy-javadoc.jar.asc + sources.asc \ + aar.asc \ + xml.asc \ + javadoc.asc ios_release_artifacts_framework: name: ios_release_artifacts_framework @@ -119,15 +119,11 @@ jobs: --ios_multi_cpus=i386,x86_64,armv7,arm64 \ --config=remote-ci-macos \ --remote_header="Authorization=Bearer $GITHUB_TOKEN" \ - //:ios_dist - - name: 'Create temporary directory for artifact to produce properly named zip' - run: mkdir -p dist/ios_artifact/Envoy.framework - - name: 'Move artifact to directory for zipping' - run: mv dist/Envoy.framework/* dist/ios_artifact/Envoy.framework + //library/swift:ios_framework - uses: actions/upload-artifact@v2 with: name: envoy_ios_framework - path: dist/ios_artifact + path: bazel-bin/library/swift/ios_framework.zip ios_release_artifacts_cocoapods: name: ios_release_artifacts_cocoapods diff --git a/.gitignore b/.gitignore index d212a33590..e52f81155e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,15 +5,7 @@ .vscode /bazel-* /build_* -/dist/*pom.xml -/dist/*.aar -/dist/*.jar -/dist/*.objdump -/dist/*.objdump.gz -/dist/envoy_aar_sources.zip -/dist/Envoy.framework -/dist/*.asc -/dist/*.sha256 +/dist/ /generated /test/coverage/BUILD /tmp diff --git a/BUILD b/BUILD index 6a3cbca360..476007d8ca 100644 --- a/BUILD +++ b/BUILD @@ -3,23 +3,8 @@ load("@io_bazel_rules_kotlin//kotlin/internal:toolchains.bzl", "define_kt_toolch licenses(["notice"]) # Apache 2 alias( - name = "ios_framework", - actual = "//library/swift:ios_framework", - visibility = ["//visibility:public"], -) - -genrule( name = "ios_dist", - srcs = [":ios_framework"], - outs = ["ios_out"], - cmd = """ -unzip -o $< -d dist/ -touch $@ -""", - stamp = True, - # This action writes to a non-hermetic output location, so it needs to run - # locally. - tags = ["local"], + actual = "//library/swift:ios_framework", ) alias( @@ -28,53 +13,24 @@ alias( visibility = ["//visibility:public"], ) -genrule( - name = "android_dist_ci", - srcs = [ - "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar_with_artifacts", - ], - outs = ["envoy_mobile.zip"], - cmd = """ - for artifact in $(SRCS); do - chmod 755 $$artifact - cp $$artifact dist/ - done - touch $@ - """, - local = True, - stamp = True, - tools = ["//bazel:zipper"], +aar_import( + name = "envoy_mobile_android", + aar = "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar", visibility = ["//visibility:public"], ) -genrule( +alias( + name = "android_dist_ci", + actual = "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar_with_artifacts", +) + +filegroup( name = "android_dist", srcs = [ "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar", - "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar_pom_xml", "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar_objdump_collector", + "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar_pom_xml", ], - outs = ["output_in_dist_directory"], - cmd = """ - set -- $(SRCS) - chmod 755 $$1 - chmod 755 $$2 - cp $$1 dist/envoy.aar - cp $$2 dist/envoy-pom.xml - shift 2 - - mkdir -p dist/symbols - if [[ -n "$$@" ]]; then - chmod 755 $$@ - cp $$@ dist/symbols - tar -cvf dist/symbols.tar dist/symbols - fi - touch $@ - """, - stamp = True, - # This action writes to a non-hermetic output location, so it needs to run - # locally. - tags = ["local"], ) define_kt_toolchain( diff --git a/dist/sonatype_nexus_upload.py b/ci/sonatype_nexus_upload.py similarity index 96% rename from dist/sonatype_nexus_upload.py rename to ci/sonatype_nexus_upload.py index 98a4d016b3..4a91ea10e5 100755 --- a/dist/sonatype_nexus_upload.py +++ b/ci/sonatype_nexus_upload.py @@ -133,7 +133,7 @@ def _upload_files(staging_id, version, files, ascs, sha256): # aggregate all the files for uploading all_files = files + ascs + sha256 for file in all_files: - # This will output "dist/envoy", ".aar" for "dist/envoy.aar + # This will output "envoy", ".aar" for "envoy.aar print("Uploading file {}".format(file)) suffix, file_extension = _resolve_name(file) basename = "{name}-{version}{suffix}.{extension}".format( @@ -281,10 +281,10 @@ def _build_parser(): Files to upload The checklist for Envoy Mobile files are: - dist/envoy.aar - dist/envoy-pom.xml - dist/envoy-sources.jar - dist/envoy-javadoc.jar + envoy.aar + envoy-pom.xml + envoy-sources.jar + envoy-javadoc.jar """) parser.add_argument("--signed_files", nargs="+", required=False, help=""" @@ -292,10 +292,10 @@ def _build_parser(): Sonatype requires uploaded artifacts to be gpg signed GPG signed: - dist/envoy.aar.asc - dist/envoy-pom.xml.asc - dist/envoy-sources.jar.asc - dist/envoy-javadoc.jar.asc + envoy.aar.asc + envoy-pom.xml.asc + envoy-sources.jar.asc + envoy-javadoc.jar.asc """) return parser diff --git a/dist/BUILD b/dist/BUILD deleted file mode 100644 index 2657e4bc00..0000000000 --- a/dist/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -load("@build_bazel_rules_android//android:rules.bzl", "aar_import") -load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_framework_import") - -licenses(["notice"]) # Apache 2 - -# NOTE: You must first build the top-level targets //:ios_dist and //:android_dist to use the -# artifacts referenced here. -# You can also download the distributables referenced here from envoy-mobile's releases page: -# https://github.com/envoyproxy/envoy-mobile/releases - -aar_import( - name = "envoy_mobile_android", - aar = "envoy.aar", - visibility = ["//visibility:public"], -) - -apple_static_framework_import( - name = "envoy_mobile_ios", - framework_imports = glob(["Envoy.framework/**"]), - sdk_dylibs = [ - "resolv.9", - "c++", - ], - sdk_frameworks = [ - "Network", - "SystemConfiguration", - "UIKit", - ], - visibility = ["//visibility:public"], -) diff --git a/docs/root/start/building/building.rst b/docs/root/start/building/building.rst index ef30a6428c..acacc68450 100644 --- a/docs/root/start/building/building.rst +++ b/docs/root/start/building/building.rst @@ -71,12 +71,12 @@ This command is defined in the main :repo:`BUILD ` file of the repo, and ``./bazelw build android_dist --config=android --fat_apk_cpu=`` -Upon completion of the build, you'll see an ``envoy.aar`` file at :repo:`dist/envoy.aar `. +Upon completion of the build, you'll see an ``envoy.aar`` file at :repo:`bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar`. Alternatively, you can use the **prebuilt artifact** from Envoy Mobile's releases_ or from :ref:`Maven `. -The ``envoy_mobile_android`` Bazel rule defined in the :repo:`dist BUILD file ` provides +The ``envoy_mobile_android`` Bazel rule defined in the :repo:`root BUILD file ` provides an example of how this artifact may be used. **When building the artifact for release** (usage outside of development), be sure to include the @@ -97,15 +97,11 @@ This command is defined in the main :repo:`BUILD ` file of the repo, and ``./bazelw build ios_dist --config=ios`` -Upon completion of the build, you'll see a ``Envoy.framework`` directory at -:repo:`dist/Envoy.framework `. +Upon completion of the build, you'll see a ``ios_framework.zip`` file at output in a path bazel picks. Alternatively, you can use the prebuilt artifact from Envoy Mobile's releases_ (envoy_android_aar_sources.zip) or from :ref:`CocoaPods `. -The ``envoy_mobile_ios`` Bazel rule defined in the :repo:`dist BUILD file ` provides an -example of how this artifact may be used. - **When building the artifact for release** (usage outside of development), be sure to include the ``--config=release-ios`` option, along with the architectures for which the artifact is being built: @@ -176,7 +172,7 @@ To deploy Envoy Mobile's aar to your local maven repository, run the following c ./bazelw build android_dist --config=android --fat_apk_cpu=x86 # To publish to local maven. - dist/sonatype_nexus_upload.py --files dist/envoy.aar dist/envoy-pom.xml --local + ci/sonatype_nexus_upload.py --local --files bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml The version deployed will be ``LOCAL-SNAPSHOT``. These artifacts can be found in your local maven directory (``~/.m2/repository/io/envoyproxy/envoymobile/envoy/LOCAL-SNAPSHOT/``) diff --git a/examples/java/hello_world/BUILD b/examples/java/hello_world/BUILD index eda8ee3f20..fe3739a27e 100644 --- a/examples/java/hello_world/BUILD +++ b/examples/java/hello_world/BUILD @@ -28,7 +28,7 @@ kt_android_library( "res/layout/activity_main.xml", ], deps = [ - "//dist:envoy_mobile_android", + "//:envoy_mobile_android", "//examples/kotlin/shared:hello_envoy_shared_lib", artifact("androidx.recyclerview:recyclerview"), artifact("androidx.annotation:annotation"), diff --git a/examples/kotlin/hello_world/BUILD b/examples/kotlin/hello_world/BUILD index 61635225f1..07fbe4fbb7 100644 --- a/examples/kotlin/hello_world/BUILD +++ b/examples/kotlin/hello_world/BUILD @@ -29,7 +29,7 @@ kt_android_library( "res/layout/activity_main.xml", ], deps = [ - "//dist:envoy_mobile_android", + "//:envoy_mobile_android", "//examples/kotlin/shared:hello_envoy_shared_lib", artifact("androidx.recyclerview:recyclerview"), artifact("androidx.annotation:annotation"), diff --git a/examples/objective-c/hello_world/BUILD b/examples/objective-c/hello_world/BUILD index 39f19d73ce..bc67aaa3f7 100644 --- a/examples/objective-c/hello_world/BUILD +++ b/examples/objective-c/hello_world/BUILD @@ -10,7 +10,7 @@ objc_library( "*.h", "*.m", ]), - deps = ["//dist:envoy_mobile_ios"], + deps = ["//library/swift:ios_lib"], ) ios_application( diff --git a/examples/swift/async_await/BUILD b/examples/swift/async_await/BUILD index 8ad89a6f80..d667ef5c01 100644 --- a/examples/swift/async_await/BUILD +++ b/examples/swift/async_await/BUILD @@ -7,7 +7,7 @@ swift_library( name = "appmain", srcs = glob(["*.swift"]), linkopts = ["-lNetwork"], - deps = ["//dist:envoy_mobile_ios"], + deps = ["//library/swift:ios_lib"], ) ios_application( diff --git a/examples/swift/hello_world/BUILD b/examples/swift/hello_world/BUILD index 7599269040..bd29c622f4 100644 --- a/examples/swift/hello_world/BUILD +++ b/examples/swift/hello_world/BUILD @@ -7,7 +7,7 @@ licenses(["notice"]) # Apache 2 swift_library( name = "appmain", srcs = glob(["*.swift"]), - deps = ["//dist:envoy_mobile_ios"], + deps = ["//library/swift:ios_lib"], ) ios_application( diff --git a/test/kotlin/apps/baseline/BUILD b/test/kotlin/apps/baseline/BUILD index 61635225f1..07fbe4fbb7 100644 --- a/test/kotlin/apps/baseline/BUILD +++ b/test/kotlin/apps/baseline/BUILD @@ -29,7 +29,7 @@ kt_android_library( "res/layout/activity_main.xml", ], deps = [ - "//dist:envoy_mobile_android", + "//:envoy_mobile_android", "//examples/kotlin/shared:hello_envoy_shared_lib", artifact("androidx.recyclerview:recyclerview"), artifact("androidx.annotation:annotation"), diff --git a/test/kotlin/apps/experimental/BUILD b/test/kotlin/apps/experimental/BUILD index 61635225f1..07fbe4fbb7 100644 --- a/test/kotlin/apps/experimental/BUILD +++ b/test/kotlin/apps/experimental/BUILD @@ -29,7 +29,7 @@ kt_android_library( "res/layout/activity_main.xml", ], deps = [ - "//dist:envoy_mobile_android", + "//:envoy_mobile_android", "//examples/kotlin/shared:hello_envoy_shared_lib", artifact("androidx.recyclerview:recyclerview"), artifact("androidx.annotation:annotation"), diff --git a/test/swift/apps/baseline/BUILD b/test/swift/apps/baseline/BUILD index a91d847487..3b4ae9c500 100644 --- a/test/swift/apps/baseline/BUILD +++ b/test/swift/apps/baseline/BUILD @@ -7,7 +7,7 @@ licenses(["notice"]) # Apache 2 swift_library( name = "appmain", srcs = glob(["*.swift"]), - deps = ["//dist:envoy_mobile_ios"], + deps = ["//library/swift:ios_lib"], ) ios_application( diff --git a/test/swift/apps/experimental/BUILD b/test/swift/apps/experimental/BUILD index 7599269040..bd29c622f4 100644 --- a/test/swift/apps/experimental/BUILD +++ b/test/swift/apps/experimental/BUILD @@ -7,7 +7,7 @@ licenses(["notice"]) # Apache 2 swift_library( name = "appmain", srcs = glob(["*.swift"]), - deps = ["//dist:envoy_mobile_ios"], + deps = ["//library/swift:ios_lib"], ) ios_application( diff --git a/tools/check_format.sh b/tools/check_format.sh index d1373d26fb..d57fff5c4d 100755 --- a/tools/check_format.sh +++ b/tools/check_format.sh @@ -23,7 +23,7 @@ TARGET_PATH="$2" # TODO(mattklein123): WORKSPACE is excluded due to warning about @bazel_tools reference. Fix here # or in the upstream checker. ENVOY_BAZEL_PREFIX=@envoy envoy/tools/code_format/check_format.py \ - --add-excluded-prefixes ./envoy/ ./envoy_build_config/extensions_build_config.bzl ./WORKSPACE ./dist/Envoy.framework/ ./library/common/config_template.cc ./bazel/envoy_mobile_swift_bazel_support.bzl ./bazel/envoy_mobile_repositories.bzl \ + --add-excluded-prefixes ./envoy/ ./envoy_build_config/extensions_build_config.bzl ./WORKSPACE ./dist/ ./library/common/config_template.cc ./bazel/envoy_mobile_swift_bazel_support.bzl ./bazel/envoy_mobile_repositories.bzl \ --skip_envoy_build_rule_check "$ENVOY_FORMAT_ACTION" $TARGET_PATH \ --namespace_check_excluded_paths ./envoy ./examples/ ./library/java/ ./library/kotlin ./library/objective-c ./test/java ./test/java ./test/objective-c ./test/swift ./experimental/swift \ --build_fixer_check_excluded_paths ./envoy ./BUILD ./dist ./examples ./library/java ./library/kotlin ./library/objective-c ./library/swift ./library/common/extensions ./test/java ./test/kotlin ./test/objective-c ./test/swift ./experimental/swift From 695faefd4f46acc79759009b2c1cbd21b9b6d7ec Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 26 Apr 2022 08:37:44 -0700 Subject: [PATCH 2/5] Add rule to allow importing framework in the same build Signed-off-by: Keith Smiley --- BUILD | 22 ++++++++++ bazel/framework_imports_extractor.bzl | 56 ++++++++++++++++++++++++++ examples/objective-c/hello_world/BUILD | 2 +- examples/swift/async_await/BUILD | 2 +- examples/swift/hello_world/BUILD | 2 +- test/swift/apps/baseline/BUILD | 2 +- test/swift/apps/experimental/BUILD | 2 +- 7 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 bazel/framework_imports_extractor.bzl diff --git a/BUILD b/BUILD index 476007d8ca..3fecbde03f 100644 --- a/BUILD +++ b/BUILD @@ -1,4 +1,6 @@ +load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_framework_import") load("@io_bazel_rules_kotlin//kotlin/internal:toolchains.bzl", "define_kt_toolchain") +load("//bazel:framework_imports_extractor.bzl", "framework_imports_extractor") licenses(["notice"]) # Apache 2 @@ -7,6 +9,26 @@ alias( actual = "//library/swift:ios_framework", ) +framework_imports_extractor( + name = "framework_imports", + framework = "//library/swift:ios_framework", +) + +apple_static_framework_import( + name = "envoy_mobile_ios", + framework_imports = [":framework_imports"], + sdk_dylibs = [ + "resolv.9", + "c++", + ], + sdk_frameworks = [ + "Network", + "SystemConfiguration", + "UIKit", + ], + visibility = ["//visibility:public"], +) + alias( name = "android_aar", actual = "//library/kotlin/io/envoyproxy/envoymobile:envoy_aar", diff --git a/bazel/framework_imports_extractor.bzl b/bazel/framework_imports_extractor.bzl new file mode 100644 index 0000000000..b502abaa0f --- /dev/null +++ b/bazel/framework_imports_extractor.bzl @@ -0,0 +1,56 @@ +""" +This rule declares outputs for files from an distributable framework. +This allows us to reproduce what it's like to import our distribution artifact +within the same build. Ideally we could just propagate the directory so we +didn't have to enumerate the files in the framework zip, but that isn't +supported by 'apple_static_framework_import'. +""" + +load("//bazel:config.bzl", "MINIMUM_IOS_VERSION") + +def _framework_imports_extractor(ctx): + outputs = [ + ctx.actions.declare_file("Envoy.framework/Envoy"), + ctx.actions.declare_file("Envoy.framework/Headers/Envoy.h"), + ctx.actions.declare_file("Envoy.framework/Modules/module.modulemap"), + ] + for arch in ctx.split_attr.framework.keys(): + if not arch.startswith("ios_"): + fail("Unexpected arch: {}".format(arch)) + + arch = arch[4:] + + # ios_sim_arm64 is a temporary special case for the M1. + if arch.startswith("sim_"): + arch = arch[4:] + + outputs.extend([ + ctx.actions.declare_file("Envoy.framework/Modules/Envoy.swiftmodule/{}.swiftdoc".format(arch)), + ctx.actions.declare_file("Envoy.framework/Modules/Envoy.swiftmodule/{}.swiftinterface".format(arch)), + ]) + + if len(ctx.attr.framework[0].files.to_list()) != 1: + fail("Expected exactly one framework zip, got {}".format(ctx.attr.framework[0].files)) + + framework_zip = ctx.attr.framework[0].files.to_list()[0] + ctx.actions.run_shell( + inputs = [framework_zip], + outputs = outputs, + command = "unzip -qq {} -d {}".format(framework_zip.path, ctx.bin_dir.path), + progress_message = "Extracting framework", + ) + + return [DefaultInfo(files = depset(outputs))] + +framework_imports_extractor = rule( + attrs = dict( + framework = attr.label( + mandatory = True, + cfg = apple_common.multi_arch_split, + ), + platform_type = attr.string(default = "ios"), + minimum_os_version = attr.string(default = MINIMUM_IOS_VERSION), + ), + # fragments = ["apple"], + implementation = _framework_imports_extractor, +) diff --git a/examples/objective-c/hello_world/BUILD b/examples/objective-c/hello_world/BUILD index bc67aaa3f7..96ba9f355f 100644 --- a/examples/objective-c/hello_world/BUILD +++ b/examples/objective-c/hello_world/BUILD @@ -10,7 +10,7 @@ objc_library( "*.h", "*.m", ]), - deps = ["//library/swift:ios_lib"], + deps = ["//:envoy_mobile_ios"], ) ios_application( diff --git a/examples/swift/async_await/BUILD b/examples/swift/async_await/BUILD index d667ef5c01..12e6582b0d 100644 --- a/examples/swift/async_await/BUILD +++ b/examples/swift/async_await/BUILD @@ -7,7 +7,7 @@ swift_library( name = "appmain", srcs = glob(["*.swift"]), linkopts = ["-lNetwork"], - deps = ["//library/swift:ios_lib"], + deps = ["//:envoy_mobile_ios"], ) ios_application( diff --git a/examples/swift/hello_world/BUILD b/examples/swift/hello_world/BUILD index bd29c622f4..123d5abc1c 100644 --- a/examples/swift/hello_world/BUILD +++ b/examples/swift/hello_world/BUILD @@ -7,7 +7,7 @@ licenses(["notice"]) # Apache 2 swift_library( name = "appmain", srcs = glob(["*.swift"]), - deps = ["//library/swift:ios_lib"], + deps = ["//:envoy_mobile_ios"], ) ios_application( diff --git a/test/swift/apps/baseline/BUILD b/test/swift/apps/baseline/BUILD index 3b4ae9c500..96a3bf4c14 100644 --- a/test/swift/apps/baseline/BUILD +++ b/test/swift/apps/baseline/BUILD @@ -7,7 +7,7 @@ licenses(["notice"]) # Apache 2 swift_library( name = "appmain", srcs = glob(["*.swift"]), - deps = ["//library/swift:ios_lib"], + deps = ["//:envoy_mobile_ios"], ) ios_application( diff --git a/test/swift/apps/experimental/BUILD b/test/swift/apps/experimental/BUILD index bd29c622f4..123d5abc1c 100644 --- a/test/swift/apps/experimental/BUILD +++ b/test/swift/apps/experimental/BUILD @@ -7,7 +7,7 @@ licenses(["notice"]) # Apache 2 swift_library( name = "appmain", srcs = glob(["*.swift"]), - deps = ["//library/swift:ios_lib"], + deps = ["//:envoy_mobile_ios"], ) ios_application( From b1857cdaaed9a4a3b00242724d1e04824bdb7c35 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 9 May 2022 12:46:54 -0700 Subject: [PATCH 3/5] Add imports for now Signed-off-by: Keith Smiley --- BUILD | 1 + bazel/android_artifacts.bzl | 5 +++-- bazel/kotlin_test.bzl | 6 +++--- library/java/io/envoyproxy/envoymobile/engine/BUILD | 1 + library/java/org/chromium/net/BUILD | 1 + test/java/io/envoyproxy/envoymobile/engine/testing/BUILD | 1 + test/swift/integration/BUILD | 1 + 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/BUILD b/BUILD index 3fecbde03f..c8b6e1b787 100644 --- a/BUILD +++ b/BUILD @@ -1,3 +1,4 @@ +load("@build_bazel_rules_android//android:rules.bzl", "aar_import") load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_framework_import") load("@io_bazel_rules_kotlin//kotlin/internal:toolchains.bzl", "define_kt_toolchain") load("//bazel:framework_imports_extractor.bzl", "framework_imports_extractor") diff --git a/bazel/android_artifacts.bzl b/bazel/android_artifacts.bzl index 65f20779c6..e577b4d2a5 100644 --- a/bazel/android_artifacts.bzl +++ b/bazel/android_artifacts.bzl @@ -1,3 +1,4 @@ +load("@build_bazel_rules_android//android:rules.bzl", "android_binary") load("@envoy_mobile//bazel:dokka.bzl", "sources_javadocs") load("@rules_java//java:defs.bzl", "java_binary") load("@rules_cc//cc:defs.bzl", "cc_library") @@ -191,7 +192,7 @@ def _create_jni_library(name, native_deps = []): ) # This outputs {jni_archive_name}_unsigned.apk which will contain the base files for our aar - native.android_binary( + android_binary( name = jni_archive_name, manifest = name + "_generated_AndroidManifest.xml", custom_package = "does.not.matter", @@ -221,7 +222,7 @@ def _create_classes_jar(name, manifest, android_library): # This creates bazel-bin/library/kotlin/io/envoyproxy/envoymobile/{name}_bin_deploy.jar # This jar has all the classes needed for our aar and will be our `classes.jar` - native.android_binary( + android_binary( name = android_binary_name, manifest = manifest, custom_package = "does.not.matter", diff --git a/bazel/kotlin_test.bzl b/bazel/kotlin_test.bzl index 2abe7bf0fb..dc83c4b86e 100644 --- a/bazel/kotlin_test.bzl +++ b/bazel/kotlin_test.bzl @@ -1,3 +1,4 @@ +load("@build_bazel_rules_android//android:rules.bzl", "android_library", "android_local_test") load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") load("//bazel:kotlin_lib.bzl", "native_lib_name") @@ -67,7 +68,7 @@ def envoy_mobile_kt_test(name, srcs, deps = [], repository = "", exec_properties # A basic macro to run android based (robolectric) tests with native dependencies def envoy_mobile_android_test(name, srcs, deps = [], native_deps = [], repository = "", library_path = "library/common/jni", exec_properties = {}): lib_name = native_lib_name(native_deps[0])[3:] - native.android_library( + android_library( name = name + "_test_lib", custom_package = "io.envoyproxy.envoymobile.test", manifest = repository + "//bazel:test_manifest.xml", @@ -76,8 +77,7 @@ def envoy_mobile_android_test(name, srcs, deps = [], native_deps = [], repositor exports = deps, testonly = True, ) - - native.android_local_test( + android_local_test( name = name, srcs = srcs, data = native_deps, diff --git a/library/java/io/envoyproxy/envoymobile/engine/BUILD b/library/java/io/envoyproxy/envoymobile/engine/BUILD index 3b0f29c85e..3cd8171616 100644 --- a/library/java/io/envoyproxy/envoymobile/engine/BUILD +++ b/library/java/io/envoyproxy/envoymobile/engine/BUILD @@ -1,3 +1,4 @@ +load("@build_bazel_rules_android//android:rules.bzl", "android_library") load("@rules_java//java:defs.bzl", "java_library") licenses(["notice"]) # Apache 2 diff --git a/library/java/org/chromium/net/BUILD b/library/java/org/chromium/net/BUILD index 64bc1d6db3..dd4c59e1e4 100644 --- a/library/java/org/chromium/net/BUILD +++ b/library/java/org/chromium/net/BUILD @@ -1,3 +1,4 @@ +load("@build_bazel_rules_android//android:rules.bzl", "android_library") load("@rules_jvm_external//:defs.bzl", "artifact") licenses(["notice"]) # Apache 2 diff --git a/test/java/io/envoyproxy/envoymobile/engine/testing/BUILD b/test/java/io/envoyproxy/envoymobile/engine/testing/BUILD index fcdd93891c..efcd796cfa 100644 --- a/test/java/io/envoyproxy/envoymobile/engine/testing/BUILD +++ b/test/java/io/envoyproxy/envoymobile/engine/testing/BUILD @@ -1,3 +1,4 @@ +load("@build_bazel_rules_android//android:rules.bzl", "android_library") load("@envoy//bazel:envoy_build_system.bzl", "envoy_package") load("@envoy_mobile//bazel:kotlin_test.bzl", "envoy_mobile_android_test") diff --git a/test/swift/integration/BUILD b/test/swift/integration/BUILD index 47f604fe5f..f5531c3971 100644 --- a/test/swift/integration/BUILD +++ b/test/swift/integration/BUILD @@ -1,3 +1,4 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") load("@envoy_mobile//bazel:apple_test.bzl", "envoy_mobile_swift_test") load("@envoy_mobile//bazel:envoy_mobile_test_extensions.bzl", "TEST_EXTENSIONS") load("@envoy//bazel:envoy_build_system.bzl", "envoy_cc_library") From fa100ce77ebad3472c14eecb5521ef99af92caf1 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 9 May 2022 14:26:53 -0700 Subject: [PATCH 4/5] Remove cache Signed-off-by: Keith Smiley --- .github/workflows/android_build.yml | 51 ------------------------ .github/workflows/ios_build.yml | 61 ----------------------------- 2 files changed, 112 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index ac63eb666d..41dc3b4c75 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -15,26 +15,14 @@ jobs: - uses: actions/checkout@v1 with: submodules: true - - uses: actions/cache@v2 - id: check-cache - with: - key: aar-${{ github.sha }} - path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - name: 'Check cache' - - run: echo "Found envoy.aar from previous run!" - if: steps.check-cache.outputs.cache-hit == 'true' - name: 'Build cache hit' - uses: actions/setup-java@v1 - if: steps.check-cache.outputs.cache-hit != 'true' with: java-version: '8' java-package: jdk architecture: x64 - name: 'Install dependencies' - if: steps.check-cache.outputs.cache-hit != 'true' run: ./ci/mac_ci_setup.sh --android - name: 'Build envoy.aar distributable' - if: steps.check-cache.outputs.cache-hit != 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -45,7 +33,6 @@ jobs: //:android_dist_ci javahelloworld: name: java_helloworld - needs: androidbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -59,14 +46,6 @@ jobs: architecture: x64 - run: ./ci/mac_ci_setup.sh --android name: 'Install dependencies' - - uses: actions/cache@v2 - id: check-cache - with: - key: aar-${{ github.sha }} - path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - name: 'Download aar' - - run: exit 1 - if: steps.check-cache.outputs.cache-hit != 'true' - name: 'Start simulator' run: ./ci/mac_start_emulator.sh # Return to using: @@ -87,7 +66,6 @@ jobs: run: adb logcat -e "received headers with status 200" -m 1 kotlinhelloworld: name: kotlin_helloworld - needs: androidbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -101,15 +79,6 @@ jobs: architecture: x64 - name: 'Install dependencies' run: ./ci/mac_ci_setup.sh - - name: 'Download aar' - uses: actions/cache@v2 - id: check-cache - with: - key: aar-${{ github.sha }} - path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - - name: 'Short-circuit' - if: steps.check-cache.outputs.cache-hit != 'true' - run: exit 1 - name: 'Start simulator' run: ./ci/mac_start_emulator.sh # Return to using: @@ -130,7 +99,6 @@ jobs: run: adb logcat -e "received headers with status 200" -m 1 kotlinbaselineapp: name: kotlin_baseline_app - needs: androidbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -144,15 +112,6 @@ jobs: architecture: x64 - name: 'Install dependencies' run: ./ci/mac_ci_setup.sh --android - - name: 'Download aar' - uses: actions/cache@v2 - id: check-cache - with: - key: aar-${{ github.sha }} - path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - - name: 'Short-circuit' - if: steps.check-cache.outputs.cache-hit != 'true' - run: exit 1 - name: 'Start simulator' run: ./ci/mac_start_emulator.sh # Return to using: @@ -173,7 +132,6 @@ jobs: run: adb logcat -e "received headers with status 200" -m 1 kotlinexperimentalapp: name: kotlin_experimental_app - needs: androidbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -187,15 +145,6 @@ jobs: architecture: x64 - name: 'Install dependencies' run: ./ci/mac_ci_setup.sh - - name: 'Download aar' - uses: actions/cache@v2 - id: check-cache - with: - key: aar-${{ github.sha }} - path: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar - - name: 'Short-circuit' - if: steps.check-cache.outputs.cache-hit != 'true' - run: exit 1 - name: 'Start simulator' run: ./ci/mac_start_emulator.sh # Return to using: diff --git a/.github/workflows/ios_build.yml b/.github/workflows/ios_build.yml index 5e8c48d3b0..4e72173c69 100644 --- a/.github/workflows/ios_build.yml +++ b/.github/workflows/ios_build.yml @@ -15,28 +15,16 @@ jobs: - uses: actions/checkout@v1 with: submodules: true - - uses: actions/cache@v2 - id: check-cache - with: - key: framework-${{ github.sha }} - path: bazel-bin/library/swift/ios_framework.zip - name: 'Check cache' - - run: echo "Found Envoy.framework from previous run!" - if: steps.check-cache.outputs.cache-hit == 'true' - name: 'Build cache hit' - run: ./ci/mac_ci_setup.sh - if: steps.check-cache.outputs.cache-hit != 'true' name: 'Install dependencies' - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | ./bazelw shutdown ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //library/swift:ios_framework - if: steps.check-cache.outputs.cache-hit != 'true' name: 'Build Envoy.framework distributable' swifthelloworld: name: swift_helloworld - needs: iosbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -45,15 +33,6 @@ jobs: submodules: true - run: ./ci/mac_ci_setup.sh name: 'Install dependencies' - - uses: actions/cache@v2 - id: check-cache - with: - key: framework-${{ github.sha }} - path: bazel-bin/library/swift/ios_framework.zip - name: 'Download framework' - - run: exit 1 - if: steps.check-cache.outputs.cache-hit != 'true' - name: 'Short-circuit' - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //examples/swift/hello_world:app @@ -70,7 +49,6 @@ jobs: name: 'Log app run' swiftbaselineapp: name: swift_baseline_app - needs: iosbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -79,15 +57,6 @@ jobs: submodules: true - run: ./ci/mac_ci_setup.sh name: 'Install dependencies' - - uses: actions/cache@v2 - id: check-cache - with: - key: framework-${{ github.sha }} - path: bazel-bin/library/swift/ios_framework.zip - name: 'Download framework' - - run: exit 1 - if: steps.check-cache.outputs.cache-hit != 'true' - name: 'Short-circuit' - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //test/swift/apps/baseline:app @@ -104,7 +73,6 @@ jobs: name: 'Log app run' swiftexperimentalapp: name: swift_experimental_app - needs: iosbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -113,15 +81,6 @@ jobs: submodules: true - run: ./ci/mac_ci_setup.sh name: 'Install dependencies' - - uses: actions/cache@v2 - id: check-cache - with: - key: framework-${{ github.sha }} - path: bazel-bin/library/swift/ios_framework.zip - name: 'Download framework' - - run: exit 1 - if: steps.check-cache.outputs.cache-hit != 'true' - name: 'Short-circuit' - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //test/swift/apps/experimental:app @@ -138,7 +97,6 @@ jobs: name: 'Log app run' swiftasyncawait: name: swift_async_await - needs: iosbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -147,15 +105,6 @@ jobs: submodules: true - run: ./ci/mac_ci_setup.sh name: 'Install dependencies' - - uses: actions/cache@v2 - id: check-cache - with: - key: framework-${{ github.sha }} - path: bazel-bin/library/swift/ios_framework.zip - name: 'Download framework' - - run: exit 1 - if: steps.check-cache.outputs.cache-hit != 'true' - name: 'Short-circuit' - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //examples/swift/async_await:app @@ -172,7 +121,6 @@ jobs: name: 'Log app run' objchelloworld: name: objc_helloworld - needs: iosbuild runs-on: macos-12 timeout-minutes: 25 steps: @@ -181,15 +129,6 @@ jobs: submodules: true - run: ./ci/mac_ci_setup.sh name: 'Install dependencies' - - uses: actions/cache@v2 - id: check-cache - with: - key: framework-${{ github.sha }} - path: bazel-bin/library/swift/ios_framework.zip - name: 'Download framework' - - run: exit 1 - if: steps.check-cache.outputs.cache-hit != 'true' - name: 'Short-circuit' - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./bazelw build --config=ios --config=remote-ci-macos --remote_header="Authorization=Bearer $GITHUB_TOKEN" //examples/objective-c/hello_world:app From eb31c261f4b5d3419f80efae7c12e2cbb5c11cdc Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 10 May 2022 12:45:18 -0700 Subject: [PATCH 5/5] Fix typo Signed-off-by: Keith Smiley --- bazel/framework_imports_extractor.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazel/framework_imports_extractor.bzl b/bazel/framework_imports_extractor.bzl index b502abaa0f..f4a270a314 100644 --- a/bazel/framework_imports_extractor.bzl +++ b/bazel/framework_imports_extractor.bzl @@ -1,5 +1,5 @@ """ -This rule declares outputs for files from an distributable framework. +This rule declares outputs for files from a distributable framework. This allows us to reproduce what it's like to import our distribution artifact within the same build. Ideally we could just propagate the directory so we didn't have to enumerate the files in the framework zip, but that isn't