Skip to content

Commit 8bf2fc1

Browse files
chore(deps): update dependency google/googlesignin-ios to from: "7.1.0" (#984)
- Upgrade GoogleSignin - To allow an ObjC module to @import a Swift module, we include the Swift modulemap in the swift_library_group. This renders passing the depender's source type to deps_indexes.labels_for_module() obsolete.
1 parent 93b7443 commit 8bf2fc1

File tree

7 files changed

+26
-35
lines changed

7 files changed

+26
-35
lines changed

examples/resources_example/swift/Package.resolved

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/resources_example/swift/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let package = Package(
99
.package(path: "../third_party/app_lovin_sdk"),
1010
.package(path: "../third_party/package_with_resources"),
1111
.package(url: "https://github.com/SDWebImage/SDWebImageSwiftUI.git", from: "3.0.2"),
12-
.package(url: "https://github.com/google/GoogleSignIn-iOS", from: "7.0.0"),
12+
.package(url: "https://github.com/google/GoogleSignIn-iOS", from: "7.1.0"),
1313
.package(
1414
url: "https://github.com/GoogleCloudPlatform/recaptcha-enterprise-mobile-sdk",
1515
from: "18.4.2"

examples/resources_example/swift_deps_index.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@
128128
{
129129
"name": "GTMAppAuth",
130130
"c99name": "GTMAppAuth",
131-
"src_type": "objc",
131+
"src_type": "swift",
132132
"label": "@swiftpkg_gtmappauth//:GTMAppAuth.rspm",
133+
"modulemap_label": "@swiftpkg_gtmappauth//:GTMAppAuth.rspm_modulemap",
133134
"package_identity": "gtmappauth",
134135
"product_memberships": [
135136
"GTMAppAuth"
@@ -336,36 +337,36 @@
336337
"name": "swiftpkg_appauth_ios",
337338
"identity": "appauth-ios",
338339
"remote": {
339-
"commit": "71cde449f13d453227e687458144bde372d30fc7",
340+
"commit": "7e2c09cbeb3bb799f26c268dbedb26325ea722a9",
340341
"remote": "https://github.com/openid/AppAuth-iOS.git",
341-
"version": "1.6.2"
342+
"version": "1.7.3"
342343
}
343344
},
344345
{
345346
"name": "swiftpkg_googlesignin_ios",
346347
"identity": "googlesignin-ios",
347348
"remote": {
348-
"commit": "7932d33686c1dc4d7df7a919aae47361d1cdfda4",
349+
"commit": "a7965d134c5d3567026c523e0a8a583f73b62b0d",
349350
"remote": "https://github.com/google/GoogleSignIn-iOS",
350-
"version": "7.0.0"
351+
"version": "7.1.0"
351352
}
352353
},
353354
{
354355
"name": "swiftpkg_gtm_session_fetcher",
355356
"identity": "gtm-session-fetcher",
356357
"remote": {
357-
"commit": "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
358+
"commit": "9534039303015a84837090d20fa21cae6e5eadb6",
358359
"remote": "https://github.com/google/gtm-session-fetcher.git",
359-
"version": "3.1.1"
360+
"version": "3.3.2"
360361
}
361362
},
362363
{
363364
"name": "swiftpkg_gtmappauth",
364365
"identity": "gtmappauth",
365366
"remote": {
366-
"commit": "cee3c709307912d040bd1e06ca919875a92339c6",
367+
"commit": "5d7d66f647400952b1758b230e019b07c0b4b22a",
367368
"remote": "https://github.com/google/GTMAppAuth.git",
368-
"version": "2.0.0"
369+
"version": "4.1.1"
369370
}
370371
},
371372
{

swiftpkg/internal/deps_indexes.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,12 @@ def _modulemap_label_for_module(module):
201201
package = module.label.package,
202202
)
203203

204-
def _labels_for_module(module, depender_src_type):
204+
def _labels_for_module(module):
205205
"""Returns the dep labels that should be used for a module.
206206
207207
Args:
208208
module: The dependent module (`struct` as returned by
209209
`dep_indexes.new_module`).
210-
depender_src_type: The source type for the target (`string` value from
211-
`src_types`) that will depend on the module.
212210
213211
Returns:
214212
A `list` of Bazel label `struct` values as returned by `bazel_labels.new`,
@@ -222,8 +220,7 @@ def _labels_for_module(module, depender_src_type):
222220
# See `swiftpkg_build_files.bzl` for more information.
223221
labels.append(_modulemap_label_for_module(module))
224222

225-
elif (depender_src_type == src_types.objc and
226-
module.src_type == src_types.swift and
223+
elif (module.src_type == src_types.swift and
227224
module.modulemap_label != None):
228225
# If an Objc module wants to @import a Swift module, it will need the
229226
# modulemap target.

swiftpkg/internal/pkginfo_target_deps.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Unrecognized target dependency while generating a Bazel dependency label.\
9999
labels = [product.label]
100100
elif module:
101101
labels = (
102-
deps_indexes.labels_for_module(module, depender_module.src_type)
102+
deps_indexes.labels_for_module(module)
103103
)
104104
else:
105105
labels = []

swiftpkg/internal/swiftpkg_build_files.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ load(":bazel_apple_platforms.bzl", "bazel_apple_platforms")
77
load(":build_decls.bzl", "build_decls")
88
load(":build_files.bzl", "build_files")
99
load(":bzl_selects.bzl", "bzl_selects")
10-
load(":deps_indexes.bzl", "deps_indexes", "src_types")
10+
load(":deps_indexes.bzl", "deps_indexes")
1111
load(":load_statements.bzl", "load_statements")
1212
load(":pkginfo_target_deps.bzl", "pkginfo_target_deps")
1313
load(":pkginfo_targets.bzl", "pkginfo_targets")
@@ -717,13 +717,14 @@ def _library_product_build_file(deps_index_ctx, product):
717717
for tname in product.targets
718718
]
719719
label_infos = lists.flatten([
720-
deps_indexes.labels_for_module(module, src_types.swift)
720+
deps_indexes.labels_for_module(module)
721721
for module in modules
722722
])
723723
target_labels = [
724724
bazel_labels.normalize(label_info)
725725
for label_info in label_infos
726726
]
727+
727728
if len(target_labels) == 0:
728729
fail("No targets specified for a library product. name:", product.name)
729730
return build_files.new(

swiftpkg/tests/deps_indexes_tests.bzl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,13 @@ def _labels_for_module_test(ctx):
163163
struct(
164164
msg = "Swift depend upon Swift",
165165
dep_module = "@example_cool_repo//:Foo",
166-
depender_module = "@example_cool_repo//:Bar",
167166
exp = [
168167
bazel_labels.parse("@example_cool_repo//:Foo"),
169168
],
170169
),
171170
struct(
172171
msg = "Swift library depends upon Objc library",
173172
dep_module = "@example_cool_repo//:ObjcLibrary",
174-
depender_module = "@example_cool_repo//:Bar",
175173
exp = [
176174
bazel_labels.parse("@example_cool_repo//:ObjcLibrary"),
177175
bazel_labels.parse("@example_cool_repo//:ObjcLibrary_modulemap"),
@@ -180,16 +178,13 @@ def _labels_for_module_test(ctx):
180178
struct(
181179
msg = "Objc library depends upon Swift library without modulemap",
182180
dep_module = "@example_cool_repo//:Foo",
183-
depender_module = "@example_cool_repo//:ObjcLibrary",
184181
exp = [
185182
bazel_labels.parse("@example_cool_repo//:Foo"),
186-
# bazel_labels.parse("@example_cool_repo//:Foo_modulemap"),
187183
],
188184
),
189185
struct(
190186
msg = "Objc library depends upon Swift library with modulemap",
191187
dep_module = "@example_another_repo//Sources/Foo",
192-
depender_module = "@example_cool_repo//:ObjcLibrary",
193188
exp = [
194189
bazel_labels.parse("@example_another_repo//Sources/Foo"),
195190
bazel_labels.parse("@example_another_repo//Sources/Foo:Foo_modulemap"),
@@ -198,12 +193,9 @@ def _labels_for_module_test(ctx):
198193
]
199194
for t in tests:
200195
module = deps_indexes.get_module(_deps_index, t.dep_module)
201-
depender = deps_indexes.get_module(_deps_index, t.depender_module)
202196
if module == None:
203197
fail("The module is `None` for {}.".format(t.label))
204-
if depender == None:
205-
fail("The depender module is `None` for {}.".format(t.depender_label))
206-
actual = deps_indexes.labels_for_module(module, depender.src_type)
198+
actual = deps_indexes.labels_for_module(module)
207199
asserts.equals(env, t.exp, actual, t.msg)
208200

209201
return unittest.end(env)

0 commit comments

Comments
 (0)