diff --git a/.bazelrc b/.bazelrc index 7f3ec571..67020721 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,11 +1,11 @@ # A few settings for XCHammer's .bazelrc # Debugging: Use the remapping feature of rules_swift. build \ - --spawn_strategy=standalone \ + --spawn_strategy=local \ --strategy=SwiftCompile=worker \ --swiftcopt=-Xwrapped-swift=-debug-prefix-pwd-is-dot \ --experimental_strict_action_env=true test \ - --spawn_strategy=standalone \ + --spawn_strategy=local \ diff --git a/.bazelversion b/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/.gitignore b/.gitignore index 0a6d02b6..31ea6eab 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ external Pods/ PodsHost/ *.xcworkspace +PodToBUILD.zip diff --git a/BUILD b/BUILD index 8bc54dc3..6fccf61f 100644 --- a/BUILD +++ b/BUILD @@ -1,5 +1,6 @@ load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application", "macos_unit_test") +load("@rules_cc//cc:defs.bzl", "objc_library") objc_library( name = "ObjcSupport", @@ -8,7 +9,7 @@ objc_library( includes = ["Sources/ObjcSupport/include"] ) -# PodToBUILD is a core library enabling Skylark code generation +# PodToBUILD is a core library enabling Starlark code generation swift_library( name = "PodToBUILD", srcs = glob(["Sources/PodToBUILD/*.swift"]), @@ -53,7 +54,7 @@ swift_library( alias(name = "update_pods", actual = "//bin:update_pods") -# This tests RepoToolsCore and Skylark logic +# This tests RepoToolsCore and Starlark logic swift_library( name = "PodToBUILDTestsLib", srcs = glob(["Tests/PodToBUILDTests/*.swift"]), @@ -68,13 +69,13 @@ macos_unit_test( ) swift_library( - name = "BuildTestsLib", + name = "BuildTestsLib", srcs = glob(["Tests/BuildTests/*.swift"]), deps = [":RepoToolsCore", "@podtobuild-SwiftCheck//:SwiftCheck"], data = glob(["Examples/**/*.podspec.json"]) ) -# This tests RepoToolsCore and Skylark logic +# This tests RepoToolsCore and Starlark logic macos_unit_test( name = "BuildTests", deps = [":BuildTestsLib"], diff --git a/BazelExtensions/extensions.bzl b/BazelExtensions/extensions.bzl index 08bdcd37..511435d5 100644 --- a/BazelExtensions/extensions.bzl +++ b/BazelExtensions/extensions.bzl @@ -1,5 +1,5 @@ # This file is part of PodSpecToBUILD -# Warning: this file is not accounted for as an explict imput into the build. +# Warning: this file is not accounted for as an explicit input into the build. # Therefore, bin/RepoTools must be updated when this changes. # Acknowledgements @@ -157,7 +157,7 @@ def _module_map_impl(ctx): relative_path = "".join(["../" for i in range(len(module_map.dirname.split("/")))]) system_tag = " [system] " - content = "module " + module_name + (system_tag if ctx.attr.is_system else "" ) + " {\n" + content = "module " + module_name + (system_tag if ctx.attr.is_system else "" ) + " {\n" umbrella_header_file = None if ctx.attr.umbrella_hdr: # Note: this umbrella header is created internally. @@ -190,14 +190,19 @@ module {module_name}.Swift {{ # If the name is `module.modulemap` we propagate this as an include. If a # module map is added to `objc_library` as a dep, bazel will add these # automatically and add a _single_ include to this module map. Ideally there - # would be an API to invoke clang with -fmodule-map= + # would be an API to invoke clang with -fmodule-map= + providers = [] if ctx.attr.module_map_name == "module.modulemap": provider_hdr = [module_map] + ([umbrella_header_file] if umbrella_header_file else []) objc_provider = apple_common.new_objc_provider( module_map=depset([module_map]), - include=depset([ctx.outputs.module_map.dirname]), header=depset(provider_hdr) ) + + compilation_context = cc_common.create_compilation_context( + includes=depset([ctx.outputs.module_map.dirname])) + + providers.append(CcInfo(compilation_context=compilation_context)) else: # This is an explicit module map. Currently, we use these for swift only provider_hdr = [module_map] + ([umbrella_header_file] if umbrella_header_file else []) @@ -205,9 +210,11 @@ module {module_name}.Swift {{ header=depset(provider_hdr + [module_map]) ) + providers.append(objc_provider) + return struct( files=depset([module_map]), - providers=[objc_provider], + providers=providers, objc=objc_provider, headers=depset([module_map]), ) @@ -257,12 +264,19 @@ def gen_module_map(name, def _gen_includes_impl(ctx): includes = [] includes.extend(ctx.attr.include) + for target in ctx.attr.include_files: for f in target.files.to_list(): includes.append(f.path) - return apple_common.new_objc_provider( - include=depset(includes)) + compilation_context = cc_common.create_compilation_context( + includes=depset(includes)) + + return [ + CcInfo(compilation_context=compilation_context), + # objc_library deps requires an ObjcProvider + apple_common.new_objc_provider() + ] _gen_includes = rule( implementation=_gen_includes_impl, @@ -310,10 +324,15 @@ def _make_headermap_impl(ctx): # Extract propagated headermaps for hdr_provider in ctx.attr.deps: - if not hasattr(hdr_provider, "objc"): - continue + hdrs = [] + + if CcInfo in hdr_provider: + compilation_context = hdr_provider[CcInfo].compilation_context + hdrs.extend(compilation_context.headers.to_list()) + + if hasattr(hdr_provider, "objc"): + hdrs.extend(hdr_provider.objc.direct_headers) - hdrs = hdr_provider.objc.header.to_list() for hdr in hdrs: if hdr.path.endswith(".hmap"): # Add headermaps diff --git a/Examples/.PodsHost/BUILD b/Examples/.PodsHost/BUILD index 958dff41..8061bc5f 100644 --- a/Examples/.PodsHost/BUILD +++ b/Examples/.PodsHost/BUILD @@ -1,4 +1,5 @@ load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") +load("@rules_cc//cc:defs.bzl", "objc_library") package(default_visibility = ["//visibility:public"]) diff --git a/Examples/ArcSplitting/.bazelversion b/Examples/ArcSplitting/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/ArcSplitting/.bazelversion +++ b/Examples/ArcSplitting/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/ArcSplitting/BUILD b/Examples/ArcSplitting/BUILD index 7dd27fc9..432dea0a 100644 --- a/Examples/ArcSplitting/BUILD +++ b/Examples/ArcSplitting/BUILD @@ -1 +1,3 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library(name="all", deps=["//Vendor/ArcSplitting:ArcSplitting"]) diff --git a/Examples/ArcSplitting/WORKSPACE b/Examples/ArcSplitting/WORKSPACE index 69b71cd1..7ab27e19 100644 --- a/Examples/ArcSplitting/WORKSPACE +++ b/Examples/ArcSplitting/WORKSPACE @@ -1,4 +1,3 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -6,10 +5,10 @@ http_archive( urls = ["https://note-this-is-overridden"], ) -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -17,13 +16,14 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", +apple_rules_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -32,16 +32,9 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", ) protobuf_deps() - diff --git a/Examples/BasiciOS/.bazelrc b/Examples/BasiciOS/.bazelrc index 7f3ec571..67020721 100644 --- a/Examples/BasiciOS/.bazelrc +++ b/Examples/BasiciOS/.bazelrc @@ -1,11 +1,11 @@ # A few settings for XCHammer's .bazelrc # Debugging: Use the remapping feature of rules_swift. build \ - --spawn_strategy=standalone \ + --spawn_strategy=local \ --strategy=SwiftCompile=worker \ --swiftcopt=-Xwrapped-swift=-debug-prefix-pwd-is-dot \ --experimental_strict_action_env=true test \ - --spawn_strategy=standalone \ + --spawn_strategy=local \ diff --git a/Examples/BasiciOS/.bazelversion b/Examples/BasiciOS/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/BasiciOS/.bazelversion +++ b/Examples/BasiciOS/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/BasiciOS/BUILD b/Examples/BasiciOS/BUILD index 2459ade3..ae680fcf 100644 --- a/Examples/BasiciOS/BUILD +++ b/Examples/BasiciOS/BUILD @@ -1,4 +1,5 @@ load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") +load("@rules_cc//cc:defs.bzl", "objc_library") # This is needed for implicit entitlement rules created for # files. diff --git a/Examples/BasiciOS/WORKSPACE b/Examples/BasiciOS/WORKSPACE index 89898885..34c0ceb6 100644 --- a/Examples/BasiciOS/WORKSPACE +++ b/Examples/BasiciOS/WORKSPACE @@ -1,16 +1,16 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + http_archive( name = "rules_pods", - urls = ["https://note-this-is-overridden.com"], + urls = ["https://note-this-is-overridden"], ) -load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository") +load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository") -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -18,13 +18,14 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", +apple_rules_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -33,16 +34,11 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", ) + protobuf_deps() new_pod_repository( diff --git a/Examples/ChildPodspec/.bazelversion b/Examples/ChildPodspec/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/ChildPodspec/.bazelversion +++ b/Examples/ChildPodspec/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/ChildPodspec/BUILD b/Examples/ChildPodspec/BUILD index 98104d53..19c4ccd8 100644 --- a/Examples/ChildPodspec/BUILD +++ b/Examples/ChildPodspec/BUILD @@ -1 +1,3 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library(name="all", deps=["//Vendor/Parent:Parent"]) diff --git a/Examples/ChildPodspec/WORKSPACE b/Examples/ChildPodspec/WORKSPACE index 69b71cd1..5c0da910 100644 --- a/Examples/ChildPodspec/WORKSPACE +++ b/Examples/ChildPodspec/WORKSPACE @@ -1,4 +1,3 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -6,10 +5,10 @@ http_archive( urls = ["https://note-this-is-overridden"], ) -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -17,13 +16,14 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", +apple_rules_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -32,12 +32,6 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", diff --git a/Examples/Example.Makefile b/Examples/Example.Makefile index 43ff739b..b4841709 100644 --- a/Examples/Example.Makefile +++ b/Examples/Example.Makefile @@ -11,7 +11,7 @@ BAZEL=../../tools/bazel REPOSITORY_OVERRIDE=--override_repository=rules_pods=$(RULES_PODS_DIR) BAZEL_OPTS=$(REPOSITORY_OVERRIDE) \ --disk_cache=$(HOME)/Library/Caches/Bazel \ - --spawn_strategy=standalone \ + --spawn_strategy=local \ --apple_platform_type=ios all: bootstrap pod_test fetch build @@ -25,10 +25,14 @@ pod_test: # Build everything in this workspace .PHONY: build -build: info +build: info $(BAZEL) build :* $(BAZEL_OPTS) -test: info +.PHONY: app +app: info + $(BAZEL) build :ReactNativeApp $(BAZEL_OPTS) + +test: info $(BAZEL) test :* $(BAZEL_OPTS) # Fetch vendored pods if there's a Pods.WORKSPACE. In normal operation it isn't @@ -42,7 +46,7 @@ vendorize: # however, `rules_pods` is overriden ditto $(RULES_PODS_DIR)/BazelExtensions Vendor/rules_pods/BazelExtensions -fetch: info +fetch: info [[ ! -f Pods.WORKSPACE ]] || $(MAKE) vendorize $(BAZEL) fetch :* $(REPOSITORY_OVERRIDE) diff --git a/Examples/FBSDK/.bazelversion b/Examples/FBSDK/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/FBSDK/.bazelversion +++ b/Examples/FBSDK/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/FBSDK/BUILD b/Examples/FBSDK/BUILD index aade907f..826f1fea 100644 --- a/Examples/FBSDK/BUILD +++ b/Examples/FBSDK/BUILD @@ -1,3 +1,5 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library( name="all", deps=[ diff --git a/Examples/FBSDK/WORKSPACE b/Examples/FBSDK/WORKSPACE index 69b71cd1..5c0da910 100644 --- a/Examples/FBSDK/WORKSPACE +++ b/Examples/FBSDK/WORKSPACE @@ -1,4 +1,3 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -6,10 +5,10 @@ http_archive( urls = ["https://note-this-is-overridden"], ) -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -17,13 +16,14 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", +apple_rules_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -32,12 +32,6 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", diff --git a/Examples/PINRemoteImage/.bazelversion b/Examples/PINRemoteImage/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/PINRemoteImage/.bazelversion +++ b/Examples/PINRemoteImage/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/PINRemoteImage/BUILD b/Examples/PINRemoteImage/BUILD index 94fc2627..a88af738 100644 --- a/Examples/PINRemoteImage/BUILD +++ b/Examples/PINRemoteImage/BUILD @@ -1 +1,3 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library(name="all", deps=["//Vendor/PINRemoteImage:Core"]) diff --git a/Examples/PINRemoteImage/Pods.WORKSPACE b/Examples/PINRemoteImage/Pods.WORKSPACE index a7a36a4d..ab7e7ac3 100644 --- a/Examples/PINRemoteImage/Pods.WORKSPACE +++ b/Examples/PINRemoteImage/Pods.WORKSPACE @@ -1,6 +1,6 @@ new_pod_repository( name = "PINRemoteImage", - url = "https://github.com/pinterest/PINRemoteImage/archive/a06b4746ebbe45c87c2b449e8a40a6b7ddf96051.zip", + url = "https://github.com/pinterest/PINRemoteImage/archive/3.0.3.zip", # PINRemoteImage_Core conditionally compiles in PINCache based on these # headers user_options = ["Core.deps += //Vendor/PINCache:PINCache"], @@ -12,13 +12,13 @@ new_pod_repository( new_pod_repository( name = "PINOperation", - url = "https://github.com/pinterest/PINOperation/archive/1.1.zip", + url = "https://github.com/pinterest/PINOperation/archive/1.2.1.zip", generate_header_map = True ) new_pod_repository( name = "PINCache", - url = "https://github.com/pinterest/PINCache/archive/d886490de6d297e38f80bb750ff2dec4822fb870.zip", + url = "https://github.com/pinterest/PINCache/archive/3.0.3.zip", generate_header_map = True ) diff --git a/Examples/PINRemoteImage/WORKSPACE b/Examples/PINRemoteImage/WORKSPACE index 69b71cd1..7ab27e19 100644 --- a/Examples/PINRemoteImage/WORKSPACE +++ b/Examples/PINRemoteImage/WORKSPACE @@ -1,4 +1,3 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -6,10 +5,10 @@ http_archive( urls = ["https://note-this-is-overridden"], ) -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -17,13 +16,14 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", +apple_rules_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -32,16 +32,9 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", ) protobuf_deps() - diff --git a/Examples/PodSpecs/PINCache.podspec.json b/Examples/PodSpecs/PINCache.podspec.json index 8272f9c0..758fa52d 100644 --- a/Examples/PodSpecs/PINCache.podspec.json +++ b/Examples/PodSpecs/PINCache.podspec.json @@ -1,6 +1,6 @@ { "name": "PINCache", - "version": "3.0.1-beta.4", + "version": "3.0.3", "homepage": "https://github.com/pinterest/PINCache", "summary": "Fast, thread safe, parallel object cache for iOS and OS X.", "authors": { @@ -9,7 +9,7 @@ }, "source": { "git": "https://github.com/pinterest/PINCache.git", - "tag": "3.0.1-beta.4" + "tag": "3.0.3" }, "license": { "type": "Apache 2.0", diff --git a/Examples/PodSpecs/PINOperation.podspec.json b/Examples/PodSpecs/PINOperation.podspec.json index a67da18f..31b4a416 100644 --- a/Examples/PodSpecs/PINOperation.podspec.json +++ b/Examples/PodSpecs/PINOperation.podspec.json @@ -1,6 +1,6 @@ { "name": "PINOperation", - "version": "1.0.3", + "version": "1.2.1", "homepage": "https://github.com/pinterest/PINOperation", "summary": "Fast, concurrency-limited task queue for iOS and OS X.", "authors": { @@ -8,7 +8,7 @@ }, "source": { "git": "https://github.com/pinterest/PINOperation.git", - "tag": "1.0.3" + "tag": "1.2.1" }, "license": { "type": "Apache 2.0", diff --git a/Examples/PodSpecs/PINRemoteImage.podspec.json b/Examples/PodSpecs/PINRemoteImage.podspec.json index 4fa7053c..208d6a8c 100644 --- a/Examples/PodSpecs/PINRemoteImage.podspec.json +++ b/Examples/PodSpecs/PINRemoteImage.podspec.json @@ -1,6 +1,6 @@ { "name": "PINRemoteImage", - "version": "3.0.0-beta.9", + "version": "3.0.3", "summary": "A thread safe, performant, feature rich image fetcher", "homepage": "https://github.com/pinterest/PINRemoteImage", "license": "Apache 2.0", @@ -9,11 +9,11 @@ }, "source": { "git": "https://github.com/pinterest/PINRemoteImage.git", - "tag": "3.0.0-beta.9" + "tag": "3.0.3" }, "social_media_url": "https://twitter.com/garrettmoon", "platforms": { - "ios": "7.0", + "ios": "8.0", "tvos": "9.0" }, "requires_arc": true, @@ -30,9 +30,9 @@ ] }, "platforms": { - "ios": "7.0", + "ios": "8.0", "tvos": "9.0", - "osx": "10.9" + "osx": "10.11" }, "source_files": "Source/Classes/**/*.{h,m}", "public_header_files": "Source/Classes/**/*.h", @@ -49,7 +49,7 @@ { "name": "iOS", "platforms": { - "ios": "7.0", + "ios": "8.0", "tvos": "9.0" }, "dependencies": { @@ -62,7 +62,7 @@ { "name": "OSX", "platforms": { - "osx": "10.9" + "osx": "10.11" }, "dependencies": { "PINRemoteImage/Core": [ @@ -122,7 +122,7 @@ ], "PINCache": [ - "=3.0.1-beta.4" + "=3.0.3" ] }, "source_files": "Source/Classes/PINCache/*.{h,m}" diff --git a/Examples/React/.bazelversion b/Examples/React/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/React/.bazelversion +++ b/Examples/React/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/React/App/AppDelegate.h b/Examples/React/App/AppDelegate.h new file mode 100644 index 00000000..78ec9db4 --- /dev/null +++ b/Examples/React/App/AppDelegate.h @@ -0,0 +1,8 @@ +#import "React/RCTBridgeDelegate.h" +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/Examples/React/App/AppDelegate.m b/Examples/React/App/AppDelegate.m new file mode 100644 index 00000000..5221ee89 --- /dev/null +++ b/Examples/React/App/AppDelegate.m @@ -0,0 +1,35 @@ +#import "AppDelegate.h" + +#import +#import +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge + moduleName:@"MobileEngine" + initialProperties:nil]; + + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/Examples/React/App/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/React/App/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..118c98f7 --- /dev/null +++ b/Examples/React/App/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/React/App/Images.xcassets/Contents.json b/Examples/React/App/Images.xcassets/Contents.json new file mode 100644 index 00000000..2d92bd53 --- /dev/null +++ b/Examples/React/App/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/Examples/React/App/Info.plist b/Examples/React/App/Info.plist new file mode 100644 index 00000000..03942e8c --- /dev/null +++ b/Examples/React/App/Info.plist @@ -0,0 +1,57 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + PodToBUILD RN + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/Examples/React/App/LaunchScreen.storyboard b/Examples/React/App/LaunchScreen.storyboard new file mode 100644 index 00000000..560e4300 --- /dev/null +++ b/Examples/React/App/LaunchScreen.storyboard @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/React/App/main.m b/Examples/React/App/main.m new file mode 100644 index 00000000..b1df44b9 --- /dev/null +++ b/Examples/React/App/main.m @@ -0,0 +1,9 @@ +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Examples/React/BUILD b/Examples/React/BUILD index a24f4e78..5bd97ed4 100644 --- a/Examples/React/BUILD +++ b/Examples/React/BUILD @@ -1,14 +1,41 @@ +load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library( - name="all", - deps=[ - "//Vendor/React:React-Core", - "//Vendor/React:DevSupport", - "//Vendor/React-RCTImage:React-RCTImage", - "//Vendor/React-RCTNetwork:React-RCTNetwork", - "//Vendor/React-RCTText:React-RCTText", - "//Vendor/React-Core:RCTWebSocket", - "//Vendor/React-CoreModules:React-CoreModules", - "//Vendor/React-RCTAnimation:React-RCTAnimation", - "//Vendor/ReactCommon:turbomodule_core", - ] + name = "AppClasses", + srcs = [ + "App/AppDelegate.m", + "App/main.m", + ], + hdrs = glob(["App/*.h"]), + sdk_frameworks = [ + "QuartzCore", + "CFNetwork", + "CoreGraphics", + "ImageIO", + "Security", + "Accelerate", + ], + deps = [ + "//Vendor/React", + "//Vendor/React:React_hmap", + ], + copts = [ + "-I$(GENDIR)/Vendor/React/React_hmap.hmap", + "-I." + ], +) + +ios_application( + name = "ReactNativeApp", + bundle_id = "example.app", + families = [ + "iphone", + ], + infoplists = ["App/Info.plist"], + minimum_os_version = "14.0", + visibility = ["//visibility:public"], + deps = [ + ":AppClasses", + ], ) diff --git a/Examples/React/Podfile.lock b/Examples/React/Podfile.lock index 4a66e520..ea370d5e 100644 --- a/Examples/React/Podfile.lock +++ b/Examples/React/Podfile.lock @@ -1,14 +1,14 @@ PODS: - boost-for-react-native (1.63.0) - DoubleConversion (1.1.6) - - FBLazyVector (0.63.1) - - FBReactNativeSpec (0.63.1): + - FBLazyVector (0.63.3) + - FBReactNativeSpec (0.63.3): - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.1) - - RCTTypeSafety (= 0.63.1) - - React-Core (= 0.63.1) - - React-jsi (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) + - RCTRequired (= 0.63.3) + - RCTTypeSafety (= 0.63.3) + - React-Core (= 0.63.3) + - React-jsi (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) - Folly (2020.01.13.00): - boost-for-react-native - DoubleConversion @@ -19,232 +19,232 @@ PODS: - DoubleConversion - glog - glog (0.3.5) - - RCTRequired (0.63.1) - - RCTTypeSafety (0.63.1): - - FBLazyVector (= 0.63.1) + - RCTRequired (0.63.3) + - RCTTypeSafety (0.63.3): + - FBLazyVector (= 0.63.3) - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.1) - - React-Core (= 0.63.1) - - React (0.63.1): - - React-Core (= 0.63.1) - - React-Core/DevSupport (= 0.63.1) - - React-Core/RCTWebSocket (= 0.63.1) - - React-RCTActionSheet (= 0.63.1) - - React-RCTAnimation (= 0.63.1) - - React-RCTBlob (= 0.63.1) - - React-RCTImage (= 0.63.1) - - React-RCTLinking (= 0.63.1) - - React-RCTNetwork (= 0.63.1) - - React-RCTSettings (= 0.63.1) - - React-RCTText (= 0.63.1) - - React-RCTVibration (= 0.63.1) - - React-callinvoker (0.63.1) - - React-Core (0.63.1): + - RCTRequired (= 0.63.3) + - React-Core (= 0.63.3) + - React (0.63.3): + - React-Core (= 0.63.3) + - React-Core/DevSupport (= 0.63.3) + - React-Core/RCTWebSocket (= 0.63.3) + - React-RCTActionSheet (= 0.63.3) + - React-RCTAnimation (= 0.63.3) + - React-RCTBlob (= 0.63.3) + - React-RCTImage (= 0.63.3) + - React-RCTLinking (= 0.63.3) + - React-RCTNetwork (= 0.63.3) + - React-RCTSettings (= 0.63.3) + - React-RCTText (= 0.63.3) + - React-RCTVibration (= 0.63.3) + - React-callinvoker (0.63.3) + - React-Core (0.63.3): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.1) - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-Core/Default (= 0.63.3) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/CoreModulesHeaders (0.63.1): + - React-Core/CoreModulesHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/Default (0.63.1): + - React-Core/Default (0.63.3): - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/DevSupport (0.63.1): + - React-Core/DevSupport (0.63.3): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.1) - - React-Core/RCTWebSocket (= 0.63.1) - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) - - React-jsinspector (= 0.63.1) + - React-Core/Default (= 0.63.3) + - React-Core/RCTWebSocket (= 0.63.3) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) + - React-jsinspector (= 0.63.3) - Yoga - - React-Core/RCTActionSheetHeaders (0.63.1): + - React-Core/RCTActionSheetHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTAnimationHeaders (0.63.1): + - React-Core/RCTAnimationHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTBlobHeaders (0.63.1): + - React-Core/RCTBlobHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTImageHeaders (0.63.1): + - React-Core/RCTImageHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTLinkingHeaders (0.63.1): + - React-Core/RCTLinkingHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTNetworkHeaders (0.63.1): + - React-Core/RCTNetworkHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTSettingsHeaders (0.63.1): + - React-Core/RCTSettingsHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTTextHeaders (0.63.1): + - React-Core/RCTTextHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTVibrationHeaders (0.63.1): + - React-Core/RCTVibrationHeaders (0.63.3): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-Core/RCTWebSocket (0.63.1): + - React-Core/RCTWebSocket (0.63.3): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.1) - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsiexecutor (= 0.63.1) + - React-Core/Default (= 0.63.3) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsiexecutor (= 0.63.3) - Yoga - - React-CoreModules (0.63.1): - - FBReactNativeSpec (= 0.63.1) + - React-CoreModules (0.63.3): + - FBReactNativeSpec (= 0.63.3) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.1) - - React-Core/CoreModulesHeaders (= 0.63.1) - - React-jsi (= 0.63.1) - - React-RCTImage (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - React-cxxreact (0.63.1): + - RCTTypeSafety (= 0.63.3) + - React-Core/CoreModulesHeaders (= 0.63.3) + - React-jsi (= 0.63.3) + - React-RCTImage (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - React-cxxreact (0.63.3): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.1) - - React-jsinspector (= 0.63.1) - - React-jsi (0.63.1): + - React-callinvoker (= 0.63.3) + - React-jsinspector (= 0.63.3) + - React-jsi (0.63.3): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsi/Default (= 0.63.1) - - React-jsi/Default (0.63.1): + - React-jsi/Default (= 0.63.3) + - React-jsi/Default (0.63.3): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsiexecutor (0.63.1): + - React-jsiexecutor (0.63.3): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) - - React-jsinspector (0.63.1) - - React-RCTActionSheet (0.63.1): - - React-Core/RCTActionSheetHeaders (= 0.63.1) - - React-RCTAnimation (0.63.1): - - FBReactNativeSpec (= 0.63.1) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) + - React-jsinspector (0.63.3) + - React-RCTActionSheet (0.63.3): + - React-Core/RCTActionSheetHeaders (= 0.63.3) + - React-RCTAnimation (0.63.3): + - FBReactNativeSpec (= 0.63.3) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.1) - - React-Core/RCTAnimationHeaders (= 0.63.1) - - React-jsi (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - React-RCTBlob (0.63.1): - - FBReactNativeSpec (= 0.63.1) + - RCTTypeSafety (= 0.63.3) + - React-Core/RCTAnimationHeaders (= 0.63.3) + - React-jsi (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - React-RCTBlob (0.63.3): + - FBReactNativeSpec (= 0.63.3) - Folly (= 2020.01.13.00) - - React-Core/RCTBlobHeaders (= 0.63.1) - - React-Core/RCTWebSocket (= 0.63.1) - - React-jsi (= 0.63.1) - - React-RCTNetwork (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - React-RCTImage (0.63.1): - - FBReactNativeSpec (= 0.63.1) + - React-Core/RCTBlobHeaders (= 0.63.3) + - React-Core/RCTWebSocket (= 0.63.3) + - React-jsi (= 0.63.3) + - React-RCTNetwork (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - React-RCTImage (0.63.3): + - FBReactNativeSpec (= 0.63.3) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.1) - - React-Core/RCTImageHeaders (= 0.63.1) - - React-jsi (= 0.63.1) - - React-RCTNetwork (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - React-RCTLinking (0.63.1): - - FBReactNativeSpec (= 0.63.1) - - React-Core/RCTLinkingHeaders (= 0.63.1) - - React-jsi (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - React-RCTNetwork (0.63.1): - - FBReactNativeSpec (= 0.63.1) + - RCTTypeSafety (= 0.63.3) + - React-Core/RCTImageHeaders (= 0.63.3) + - React-jsi (= 0.63.3) + - React-RCTNetwork (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - React-RCTLinking (0.63.3): + - FBReactNativeSpec (= 0.63.3) + - React-Core/RCTLinkingHeaders (= 0.63.3) + - React-jsi (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - React-RCTNetwork (0.63.3): + - FBReactNativeSpec (= 0.63.3) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.1) - - React-Core/RCTNetworkHeaders (= 0.63.1) - - React-jsi (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - React-RCTSettings (0.63.1): - - FBReactNativeSpec (= 0.63.1) + - RCTTypeSafety (= 0.63.3) + - React-Core/RCTNetworkHeaders (= 0.63.3) + - React-jsi (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - React-RCTSettings (0.63.3): + - FBReactNativeSpec (= 0.63.3) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.1) - - React-Core/RCTSettingsHeaders (= 0.63.1) - - React-jsi (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - React-RCTText (0.63.1): - - React-Core/RCTTextHeaders (= 0.63.1) - - React-RCTVibration (0.63.1): - - FBReactNativeSpec (= 0.63.1) + - RCTTypeSafety (= 0.63.3) + - React-Core/RCTSettingsHeaders (= 0.63.3) + - React-jsi (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - React-RCTText (0.63.3): + - React-Core/RCTTextHeaders (= 0.63.3) + - React-RCTVibration (0.63.3): + - FBReactNativeSpec (= 0.63.3) - Folly (= 2020.01.13.00) - - React-Core/RCTVibrationHeaders (= 0.63.1) - - React-jsi (= 0.63.1) - - ReactCommon/turbomodule/core (= 0.63.1) - - ReactCommon/turbomodule/core (0.63.1): + - React-Core/RCTVibrationHeaders (= 0.63.3) + - React-jsi (= 0.63.3) + - ReactCommon/turbomodule/core (= 0.63.3) + - ReactCommon/turbomodule/core (0.63.3): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.1) - - React-Core (= 0.63.1) - - React-cxxreact (= 0.63.1) - - React-jsi (= 0.63.1) + - React-callinvoker (= 0.63.3) + - React-Core (= 0.63.3) + - React-cxxreact (= 0.63.3) + - React-jsi (= 0.63.3) - Yoga (1.14.0) DEPENDENCIES: @@ -338,32 +338,32 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c DoubleConversion: cde416483dac037923206447da6e1454df403714 - FBLazyVector: a50434c875bd42f2b1c99c712bda892a1dc659c7 - FBReactNativeSpec: 393853a536428e05a9da00b6290042f09809b15b + FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d + FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f Folly: b73c3869541e86821df3c387eb0af5f65addfab4 glog: 33e83f39bad84f1081891026367203d6a254761a - RCTRequired: d9b1a9e6fa097744ca3ede59f86a35096df7202b - RCTTypeSafety: c227cd061983e9e964115afbc4e8730d6a6f1395 - React: 86e972a20967ee4137aa19dc48319405927c2e94 - React-callinvoker: 87ee376c25277d74e164ff036b27084e343f3e69 - React-Core: f5ec03baf7ed58d9f3ee04a8f84e4c97ee8bf4c9 - React-CoreModules: 958898aa8c069280e866e35a2f29480a81fcf335 - React-cxxreact: 90de76b9b51575668ad7fd4e33a5a8c143beecc2 - React-jsi: b32a31da32e030f30bbf9a8d3a9c8325df9e793f - React-jsiexecutor: 7ab9cdcdd18d57652fb041f8a147fe9658d4e00a - React-jsinspector: 2e28bb487e42dda6c94dbfa0c648d1343767a0fb - React-RCTActionSheet: 1702a1a85e550b5c36e2e03cb2bd3adea053de95 - React-RCTAnimation: ddda576010a878865a4eab83a78acd92176ef6a1 - React-RCTBlob: 34334384284c81577409d5205bd2b9ff594d8ab6 - React-RCTImage: e2a661266dca295cffb33909cc64675a2efedb26 - React-RCTLinking: cd39b9b5e9cbb9e827854e30dfa92d7db074cea8 - React-RCTNetwork: 16939b7e4058d6f662b304a1f61689e249a2bfcc - React-RCTSettings: 24726a62de0c326f9ebfc3838898a501b87ce711 - React-RCTText: 4f95d322b7e6da72817284abf8a2cdcec18b9cd8 - React-RCTVibration: f3a9123c244f35c40d3c9f3ec3f0b9e5717bb292 - ReactCommon: 2905859f84a94a381bb0d8dd3921ccb1a0047cb8 - Yoga: d5bd05a2b6b94c52323745c2c2b64557c8c66f64 + RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047 + RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab + React: f36e90f3ceb976546e97df3403e37d226f79d0e3 + React-callinvoker: 18874f621eb96625df7a24a7dc8d6e07391affcd + React-Core: ac3d816b8e3493970153f4aaf0cff18af0bb95e6 + React-CoreModules: 4016d3a4e518bcfc4f5a51252b5a05692ca6f0e1 + React-cxxreact: ffc9129013b87cb36cf3f30a86695a3c397b0f99 + React-jsi: df07aa95b39c5be3e41199921509bfa929ed2b9d + React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451 + React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2 + React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa + React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2 + React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40 + React-RCTImage: d1756599ebd4dc2cb19d1682fe67c6b976658387 + React-RCTLinking: 9af0a51c6d6a4dd1674daadafffc6d03033a6d18 + React-RCTNetwork: 332c83929cc5eae0b3bbca4add1d668e1fc18bda + React-RCTSettings: d6953772cfd55f2c68ad72b7ef29efc7ec49f773 + React-RCTText: 65a6de06a7389098ce24340d1d3556015c38f746 + React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454 + ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3 + Yoga: 7d13633d129fd179e01b8953d38d47be90db185a PODFILE CHECKSUM: 2b89daabd5eca2c25b3d551f2e421e69a395664d -COCOAPODS: 1.8.0.beta.2 +COCOAPODS: 1.10.1 diff --git a/Examples/React/Pods.WORKSPACE b/Examples/React/Pods.WORKSPACE index d8010c15..e77ac0ba 100644 --- a/Examples/React/Pods.WORKSPACE +++ b/Examples/React/Pods.WORKSPACE @@ -1,12 +1,15 @@ new_pod_repository( name = "Folly", - url = "https://github.com/facebook/folly/archive/v2016.09.26.00.zip", + url = "https://github.com/facebook/folly/archive/v2020.01.13.00.zip", podspec_url = "Vendor/React/third-party-podspecs/Folly.podspec", install_script = """ __INIT_REPO__ # This isn't actually necessary but nice. rm -rf pod_support/Headers/Public/* + + # __has_include erroneously returns true for damangle.h, which later causes an link error + sed -i '' 's/__has_include()/false/g' folly/detail/Demangle.h """, generate_header_map = False ) diff --git a/Examples/React/WORKSPACE b/Examples/React/WORKSPACE index 69b71cd1..7ab27e19 100644 --- a/Examples/React/WORKSPACE +++ b/Examples/React/WORKSPACE @@ -1,4 +1,3 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -6,10 +5,10 @@ http_archive( urls = ["https://note-this-is-overridden"], ) -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -17,13 +16,14 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", +apple_rules_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -32,16 +32,9 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", ) protobuf_deps() - diff --git a/Examples/React/bootstrap.sh b/Examples/React/bootstrap.sh index 5c99bb07..7be2a98c 100755 --- a/Examples/React/bootstrap.sh +++ b/Examples/React/bootstrap.sh @@ -4,7 +4,7 @@ set -x # Note: on this release, there's an issue with this commit. # this should be patched on somehow # https://github.com/facebook/react-native/pull/28946 -VERSION="0.63.1" +VERSION="0.63.3" cleanup() { rm -rf react-native-${VERSION}.* diff --git a/Examples/SwiftSubspec/.bazelversion b/Examples/SwiftSubspec/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/SwiftSubspec/.bazelversion +++ b/Examples/SwiftSubspec/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/SwiftSubspec/BUILD b/Examples/SwiftSubspec/BUILD index 98104d53..3062d75e 100644 --- a/Examples/SwiftSubspec/BUILD +++ b/Examples/SwiftSubspec/BUILD @@ -1 +1,4 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library(name="all", deps=["//Vendor/Parent:Parent"]) + diff --git a/Examples/SwiftSubspec/WORKSPACE b/Examples/SwiftSubspec/WORKSPACE index 6df10854..eea4ae1d 100644 --- a/Examples/SwiftSubspec/WORKSPACE +++ b/Examples/SwiftSubspec/WORKSPACE @@ -1,4 +1,3 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -6,25 +5,25 @@ http_archive( urls = ["https://note-this-is-overridden"], ) -git_repository( - name = "build_bazel_rules_ios", - remote = "https://github.com/bazel-ios/rules_ios.git", - branch = "master", +http_archive( + name = "build_bazel_rules_apple", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( - "@build_bazel_rules_ios//rules:repositories.bzl", - "rules_ios_dependencies" + "@build_bazel_rules_apple//apple:repositories.bzl", + "apple_rules_dependencies", ) -rules_ios_dependencies() +apple_rules_dependencies() load( - "@build_bazel_rules_apple//apple:repositories.bzl", - "apple_rules_dependencies", + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -34,25 +33,15 @@ load( swift_rules_dependencies() load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", + "@com_google_protobuf//:protobuf_deps.bzl", + "protobuf_deps", ) -apple_support_dependencies() +protobuf_deps() -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_python", url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.2/rules_python-0.0.2.tar.gz", strip_prefix = "rules_python-0.0.2", sha256 = "b5668cde8bb6e3515057ef465a35ad712214962f0b3a314e551204266c7be90c", ) - - -load( - "@com_google_protobuf//:protobuf_deps.bzl", - "protobuf_deps", -) - -protobuf_deps() - diff --git a/Examples/Texture/.bazelversion b/Examples/Texture/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/Texture/.bazelversion +++ b/Examples/Texture/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/Texture/BUILD b/Examples/Texture/BUILD index 7b9c2a6b..f68d0bb8 100644 --- a/Examples/Texture/BUILD +++ b/Examples/Texture/BUILD @@ -1 +1,3 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library(name="all", deps=["//Vendor/Texture:Texture"]) diff --git a/Examples/Texture/Pods.WORKSPACE b/Examples/Texture/Pods.WORKSPACE index 5766dd49..01787357 100644 --- a/Examples/Texture/Pods.WORKSPACE +++ b/Examples/Texture/Pods.WORKSPACE @@ -7,24 +7,24 @@ new_pod_repository( generate_module_map = False, ) - new_pod_repository( name = "PINRemoteImage", - url = "https://github.com/pinterest/PINRemoteImage/archive/a06b4746ebbe45c87c2b449e8a40a6b7ddf96051.zip", + url = "https://github.com/pinterest/PINRemoteImage/archive/3.0.3.zip", # PINRemoteImage_Core conditionally compiles in PINCache based on these # headers user_options = ["Core.deps += //Vendor/PINCache:PINCache"], - - generate_module_map = False + generate_module_map = False, + generate_header_map = True, ) new_pod_repository( name = "PINOperation", - url = "https://github.com/pinterest/PINOperation/archive/1.1.zip" + url = "https://github.com/pinterest/PINOperation/archive/1.2.1.zip", + generate_header_map = True ) new_pod_repository( name = "PINCache", - url = "https://github.com/pinterest/PINCache/archive/d886490de6d297e38f80bb750ff2dec4822fb870.zip" + url = "https://github.com/pinterest/PINCache/archive/3.0.3.zip", + generate_header_map = True ) - diff --git a/Examples/Texture/WORKSPACE b/Examples/Texture/WORKSPACE index 69b71cd1..5c0da910 100644 --- a/Examples/Texture/WORKSPACE +++ b/Examples/Texture/WORKSPACE @@ -1,4 +1,3 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( @@ -6,10 +5,10 @@ http_archive( urls = ["https://note-this-is-overridden"], ) -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -17,13 +16,14 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", +apple_rules_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) -apple_rules_dependencies() +apple_support_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", @@ -32,12 +32,6 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", diff --git a/Examples/TopSwiftPods/.bazelversion b/Examples/TopSwiftPods/.bazelversion index 47b322c9..fcdb2e10 100644 --- a/Examples/TopSwiftPods/.bazelversion +++ b/Examples/TopSwiftPods/.bazelversion @@ -1 +1 @@ -3.4.1 +4.0.0 diff --git a/Examples/TopSwiftPods/BUILD b/Examples/TopSwiftPods/BUILD index 87ee9d44..7579de0e 100644 --- a/Examples/TopSwiftPods/BUILD +++ b/Examples/TopSwiftPods/BUILD @@ -1,3 +1,5 @@ +load("@rules_cc//cc:defs.bzl", "objc_library") + objc_library(name='all', deps=[ "//Vendor/Alamofire", "//Vendor/Charts", diff --git a/Examples/TopSwiftPods/WORKSPACE b/Examples/TopSwiftPods/WORKSPACE index 69b71cd1..28790987 100644 --- a/Examples/TopSwiftPods/WORKSPACE +++ b/Examples/TopSwiftPods/WORKSPACE @@ -1,15 +1,9 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( - name = "rules_pods", - urls = ["https://note-this-is-overridden"], -) - -git_repository( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -17,12 +11,6 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", -) - apple_rules_dependencies() load( @@ -32,12 +20,6 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", diff --git a/Makefile b/Makefile index 1ad251c9..dafde686 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ -.PHONY: build +.PHONY: build build: @tools/bazel build \ --disk_cache=$(HOME)/Library/Caches/Bazel \ - --spawn_strategy=standalone \ + --spawn_strategy=local \ + --use_top_level_targets_for_symlinks \ :RepoTools :Compiler @ditto bazel-bin/RepoTools bin/RepoTools @ditto bazel-bin/Compiler bin/Compiler @@ -21,7 +22,7 @@ repo-tools: release goldmaster: build @./MakeGoldMaster.sh -unit-test: +unit-test: tools/bazel test :PodToBUILDTests --test_strategy=standalone @@ -45,7 +46,7 @@ pod_test: # - copy it to tmp so the examples can load it # - run Bazel for all the examples .PHONY: build-test -build-test: pod_test build archive init-sandbox +build-test: pod_test build archive init-sandbox cd Examples/BasiciOS && make all cd Examples/PINRemoteImage && make all cd Examples/Texture && make all @@ -82,14 +83,15 @@ ci: clean release: @tools/bazel build \ --disk_cache=$(HOME)/Library/Caches/Bazel \ - --spawn_strategy=standalone \ + --spawn_strategy=local \ + --use_top_level_targets_for_symlinks \ -c opt \ --swiftcopt=-whole-module-optimization :RepoTools :Compiler @ditto bazel-bin/RepoTools bin/RepoTools @ditto bazel-bin/Compiler bin/Compiler -TESTED_BAZEL_VERSION=3.4.1 +TESTED_BAZEL_VERSION=4.0.0 # Make a binary archive of PodToBUILD with the official github cli `hub` github_release: diff --git a/README.md b/README.md index b2bd9318..c5dd01aa 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository") new_pod_repository( name = "PINOperation", - url = "https://github.com/pinterest/PINOperation/archive/1.0.3.zip", + url = "https://github.com/pinterest/PINOperation/archive/1.2.1.zip", ) ``` @@ -51,7 +51,7 @@ service. As a solution, it supports `vendoring` aka out of band, in tree dependency installation. Similar to `CocoaPods`, it can download and initialize Pods -relative to the project, in the `Vendor` directory. +relative to the project, in the `Vendor` directory. The program, `bin/update_pods`, installs Pods into `Vendor/__POD_NAME__`. This notion is similar to `pod install`. @@ -121,7 +121,7 @@ ones. Instead of using a `url` that points to the remote repository, use a `url` that points to the local repository. -For example, if we wanted to depend on a local version of `PINOperation`: +For example, if we wanted to depend on a local version of `PINOperation`: ``` new_pod_repository( name = "PINOperation", @@ -157,7 +157,7 @@ warnings just for `PINOperation//:PINOperation` ``` new_pod_repository( name = "PINOperation", - url = "https://github.com/pinterest/PINOperation/archive/1.0.3.zip", + url = "https://github.com/pinterest/PINOperation/archive/1.2.1.zip", user_options = ["PINOperation.copts += -pedantic"], ) ``` diff --git a/Sources/PodToBUILD/ObjcLibrary.swift b/Sources/PodToBUILD/ObjcLibrary.swift index 1a5e4d39..d4d821c8 100644 --- a/Sources/PodToBUILD/ObjcLibrary.swift +++ b/Sources/PodToBUILD/ObjcLibrary.swift @@ -10,7 +10,7 @@ import Foundation /// Pod Support Buildable Dir is a directory which is recognized by the build system. -/// it may contain BUILD files, Skylark Extensions, etc. +/// it may contain BUILD files, Starlark Extensions, etc. public let PodSupportBuidableDir = "pod_support_buildable/" /// Pod Support Dir is the root directory for supporting Pod files @@ -472,10 +472,10 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { /// /// consumer is in a different repo //// github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/specification/consumer.rb - /// + /// /// requires_arc ends up getting the excludes applied _before the union with /// source fies. - /// + /// /// /// The & operator is a union in ruby means: /// [1,2] & [1] = [1] @@ -486,12 +486,12 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { /// In other words /// We can take /// Total = Left + Right - /// + /// /// Glob(include, exclude) /// a = 1, 2, 3 /// b = 2, 4, 6 /// we'd want 2 - /// + /// /// We can implement this operator in Bazel as /// a - ( a - b ) /// Or Glob(include: a, exclude(Glob(include: a, exclude: Glob(b) ) )) @@ -572,7 +572,7 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { }, exclude: arcSources.exclude) case let .right(patternsValue): // In cocoapods this is: - // As we don't have the union in skylark, this implements the + // As we don't have the union in Starlark, this implements the // union operator with glob ( see above comment ) // ruby: paths_for_attribute(:requires_arc) & source_files return GlobNode(include: .left(Set(patternsValue)), @@ -650,7 +650,7 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { } return externalName } - + public func toSkylark() -> SkylarkNode { let options = GetBuildOptions() @@ -663,7 +663,7 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { var libArguments = [SkylarkFunctionArgument]() libArguments.append(nameArgument) - + let enableModulesSkylark = SkylarkFunctionArgument.named(name: "enable_modules", value: enableModules ? .int(1) : .int(0)) libArguments.append(enableModulesSkylark) @@ -744,7 +744,7 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { .named(name: "visibility", value: ["//visibility:public"].toSkylark()), ] )) - + } else { inlineSkylark.append(.functionCall( name: "filegroup", @@ -816,7 +816,7 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { lib.name)) } } - + if !lib.sourceFiles.isEmpty { libArguments.append(.named( name: "srcs", @@ -871,7 +871,7 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { var allDeps: SkylarkNode = SkylarkNode.empty if !lib.deps.isEmpty { - allDeps = lib.deps.map { Set($0).sorted(by: (<)) } .toSkylark() + allDeps = lib.deps.map { Set($0).sorted(by: (<)) } .toSkylark() } if lib.includes.count > 0 { allDeps = allDeps .+. [":\(name)_includes"].toSkylark() @@ -884,7 +884,7 @@ public struct ObjcLibrary: BazelTarget, UserConfigurable, SourceExcludable { allDeps = allDeps .+. [":" + moduleMap.name ].toSkylark() } - if allDeps.isEmpty == false { + if allDeps.isEmpty == false { libArguments.append(.named( name: "deps", value: allDeps diff --git a/Tests/BuildTests/Examples/WORKSPACE b/Tests/BuildTests/Examples/WORKSPACE index 4e44bad6..1bb3388e 100644 --- a/Tests/BuildTests/Examples/WORKSPACE +++ b/Tests/BuildTests/Examples/WORKSPACE @@ -1,9 +1,9 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - tag = "0.18.0", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -13,12 +13,13 @@ load( apple_rules_dependencies() -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - tag = "0.3.0", +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", ) +apple_support_dependencies() + load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", diff --git a/WORKSPACE b/WORKSPACE index 88d11f86..2fdbf700 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,9 +1,9 @@ -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -git_repository( +http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "1cdaf74e44c4c969d7ee739b3a0f11b993c49d2a", + sha256 = "a41a75c291c69676b9974458ceee09aea60cee0e1ee282e27cdc90b679dfd30f", + url = "https://github.com/bazelbuild/rules_apple/releases/download/0.21.2/rules_apple.0.21.2.tar.gz", ) load( @@ -11,12 +11,6 @@ load( "apple_rules_dependencies", ) -git_repository( - name = "build_bazel_rules_swift", - remote = "https://github.com/bazelbuild/rules_swift.git", - commit = "d07d880dcf939e0ad98df4dd723f8516bf8a2867", -) - apple_rules_dependencies() load( @@ -26,12 +20,6 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() load( "@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps", @@ -42,4 +30,3 @@ protobuf_deps() load("//third_party:repositories.bzl", "podtobuild_dependencies") podtobuild_dependencies() - diff --git a/bin/update_pods.py b/bin/update_pods.py index ec08cdf7..7e07fb89 100755 --- a/bin/update_pods.py +++ b/bin/update_pods.py @@ -348,7 +348,7 @@ def new_pod_repository(name, podspec_url = None, strip_prefix = "", user_options = [], - install_script = None, + install_script = None, inhibit_warnings = True, trace = False, enable_modules = True, @@ -363,7 +363,7 @@ def new_pod_repository(name, url: the url of this repo. The url may either: - A http url pointing to a zip or tar archive, i.e: - https://github.com/pinterest/PINOperation/archive/1.1.zip + https://github.com/pinterest/PINOperation/archive/1.2.1.zip - an absolute path ( used for local development ). Note: We symlink the entire contents into /Vendor/__name__.