-
Notifications
You must be signed in to change notification settings - Fork 13
Target of same name as package without having a product fails #147
Comments
@pswaminathan were you able to find a solution to resolve this issue and use Firebase in SPM rules? |
Would it be trivial to fork firebase - hack the package.swift file - and get this to work? I've wasted days on this. Or could we hijack the script for firebase? # Look for the product in a package with the same name.
ref_pkg_desc = pkg_descs_dict.get(by_name)
if ref_pkg_desc != None:
product_refs.append(refs.create(ref_types.product, ref_pkg_desc["name"], by_name))
continue if ref_pkg_desc == "firebase" |
I hacked this - https://github.com/wweevv-johndpope/firebase-ios-sdk.git spm_repositories(
name = "swift_pkgs",
dependencies = [
spm_pkg(
"https://github.com/wweevv-johndpope/firebase-ios-sdk.git",
from_version = "8.10.0",
products = ["FirebaseAnalytics"],
),
],
)
swift_library(
name = "main",
module_name = "main",
srcs = glob([
"Sources/**/*.swift",
]),
copts = [
"-warnings-as-errors",
],
deps = [
"@swift_pkgs//FirebaseAnalytics:FirebaseAnalytics"
] changing Firebase -> FirebaseAnalytics let package = Package(
name: "FirebaseAnalytics",
platforms: [.iOS(.v11), .macOS(.v10_12), .tvOS(.v12), .watchOS(.v7)],
products: [
.library(
name: "FirebaseAnalytics", this matches the product name FirebaseAnalytics - but doesn't help.
|
It looks like a modulemap in one of the transitive deps has some unexpected syntax. |
this just caught my eye by @bodnar-dan not sure if this could be cause of headaches above.... |
finally found a working approach to using bazel and firebase @vikage got it working successfully - here demo app going to abandon the spm / xcframework approach for now. |
Example: Firebase
Firebase
is not a product within the Firebase package. However,_gather_deps_for_target
looks for the target name (Firebase
) in pkg_descs_dict, finds it, and treats it as a product target (link)The text was updated successfully, but these errors were encountered: