Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Cannot include package with binary (not executable) library target #175

Open
pswaminathan opened this issue Oct 5, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@pswaminathan
Copy link
Contributor

Example is Braze. Here, BrazeKit is a binary target. The Package.swift points to a zip file with an XCFramework

spm_pkg declaration:

        spm_pkg(
            url = "https://github.com/braze-inc/braze-swift-sdk.git",
            from_version = "5.5.0",
            products = ["BrazeKit", "BrazeUI"]
        ),

Traceback:

ERROR: An error occurred during the fetch of repository 'swift_pkgs':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_p/c1a9d93c5d307e720ae1d0573bce325b/external/cgrindel_rules_spm/spm/private/spm_repositories.bzl", line 593, column 30, in _spm_repositories_impl
		_configure_spm_repository(repository_ctx, pkgs, env)
	File "/private/var/tmp/_bazel_p/c1a9d93c5d307e720ae1d0573bce325b/external/cgrindel_rules_spm/spm/private/spm_repositories.bzl", line 541, column 28, in _configure_spm_repository
		_generate_bazel_pkg(
	File "/private/var/tmp/_bazel_p/c1a9d93c5d307e720ae1d0573bce325b/external/cgrindel_rules_spm/spm/private/spm_repositories.bzl", line 68, column 46, in _generate_bazel_pkg
		build_decl = _create_spm_module_decls(
	File "/private/var/tmp/_bazel_p/c1a9d93c5d307e720ae1d0573bce325b/external/cgrindel_rules_spm/spm/private/spm_repositories.bzl", line 172, column 17, in _create_spm_module_decls
		fail("Unrecognized target type. %s" % (target))
Error in fail: Unrecognized target type. {"c99name": "BrazeKit", "module_type": "BinaryTarget", "name": "BrazeKit", "path": "remote/archive/BrazeKit.zip", "product_memberships": ["BrazeKit", "BrazeUI"], "sources": [], "type": "binary", "dependencies": []}

Even if I just wanted to use BrazeUI, the traceback is the same.

@cgrindel
Copy link
Owner

cgrindel commented Oct 6, 2022

I haven't come across a binary target before. We will need to add support for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants