cgrindel / rules_spm

Provide a means for integrating external Swift packages built by Swift Package Manager into Bazel build using rules_swift.
Apache License 2.0
58 stars 13 forks source link

Error in fail: A clang target must have at least one public header. target: GoogleSignIn #174

Open marwanf1 opened 1 year ago

marwanf1 commented 1 year ago

I am unable to add the GoogleSignIn spm.

spm_repositories(
    name = "swift_pkgs",
    dependencies = [
        spm_pkg(
            name = "GoogleSignIn",
            url = "https://github.com/google/GoogleSignIn-iOS.git",
            exact_version = "6.2.4",
            products = ["GoogleSignIn"],
        ),
    ],
)

Whenever I build, I get the following output:

Starting local Bazel server and connecting to it...
ERROR: /private/var/tmp/_bazel_marwanfawaz/5dbc1f5814a610175ef92587f212f799/external/swift_pkgs/BUILD.bazel:1381:12: in spm_package rule @swift_pkgs//:build:
Traceback (most recent call last):
    File "/private/var/tmp/_bazel_marwanfawaz/5dbc1f5814a610175ef92587f212f799/external/cgrindel_rules_spm/spm/private/spm_package.bzl", line 468, column 104, in _spm_package_impl
        clang_custom_info, target_copy_infos, target_build_inputs = _customize_clang_modulemap_and_hdrs(
    File "/private/var/tmp/_bazel_marwanfawaz/5dbc1f5814a610175ef92587f212f799/external/cgrindel_rules_spm/spm/private/spm_package.bzl", line 310, column 13, in _customize_clang_modulemap_and_hdrs
        fail("A clang target must have at least one public header. target: %s" % (
Error in fail: A clang target must have at least one public header. target: GoogleSignIn
ERROR: /private/var/tmp/_bazel_marwanfawaz/5dbc1f5814a610175ef92587f212f799/external/swift_pkgs/BUILD.bazel:1381:12: Analysis of target '@swift_pkgs//:build' failed
ERROR: Analysis of target '//ios-app:Anghami' failed; build aborted:
INFO: Elapsed time: 11.737s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (74 packages loaded, 1955 targets configured)
cgrindel commented 1 year ago

I'll try and look into this in the coming week.