Conversation
Collaborator
Author
@chiragramani I've never used Bazel outside of our Uber context — do you know why this target can't use this import? It may have worked in the past with our old rules and bazel version. I also found this:
|
|
@alanzeino Thanks for putting up this PR, we'd love the new rules being supported as well where I work. I found that the following diff on the diff --git a/BUILD.bazel b/BUILD.bazel
index 4d276f7..da15ca6 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -11,6 +11,9 @@ objc_library(
defines = [
"SWIFT_PACKAGE"
],
+ includes = [
+ "src/iOSSnapshotTestCaseCore/Public"
+ ],
copts = [
"-Wno-deprecated-declarations"
],
@@ -25,5 +28,6 @@ swift_library(
deps = [
":iOSSnapshotTestCaseCore"
],
+ testonly = True,
visibility = ["//visibility:public"]
)
diff --git a/src/iOSSnapshotTestCaseTests/BUILD.bazel b/src/iOSSnapshotTestCaseTests/BUILD.bazel
index 0c63a59..6b59b7b 100644
--- a/src/iOSSnapshotTestCaseTests/BUILD.bazel
+++ b/src/iOSSnapshotTestCaseTests/BUILD.bazel
@@ -7,9 +7,6 @@ objc_library(
deps = [
"//:iOSSnapshotTestCaseCore"
],
- defines = [
- "BAZEL"
- ],
data = glob(["Resources/*.png"], allow_empty = False),
sdk_frameworks = [
"CoreGraphics",
diff --git a/src/iOSSnapshotTestCaseTests/FBSnapshotControllerTests.m b/src/iOSSnapshotTestCaseTests/FBSnapshotControllerTests.m
index 9331038..999a23b 100644
--- a/src/iOSSnapshotTestCaseTests/FBSnapshotControllerTests.m
+++ b/src/iOSSnapshotTestCaseTests/FBSnapshotControllerTests.m
@@ -8,14 +8,8 @@
*/
#import <XCTest/XCTest.h>
-#if BAZEL
-@import iOSSnapshotTestCaseCore;
-@import UIKit;
-@import CoreGraphics;
-@import QuartzCore;
-#else
+
#import "FBSnapshotTestCase.h"
-#endif
@interface FBSnapshotControllerTests : XCTestCase
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempting to update the repo so that the
build.shscript that is run in the GitHub Action succeeds.