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

spm_swift_binary - use local binary / or how to use local spm files #168

Open
johndpope opened this issue Sep 3, 2022 · 1 comment
Open

Comments

@johndpope
Copy link

johndpope commented Sep 3, 2022

background

Screen Shot 2022-09-03 at 4 22 34 pm

I hacked the official supabase library to use local packages
https://github.com/wweevv-johndpope/Supabase
I pushed to remote but apparently - you can't use local packages in remote
https://stackoverflow.com/questions/69761371/integrating-a-remote-swift-package-that-has-local-swift-packages-how-to-avoid-i

so I wonder - can I use spm_swift_binary and if so - was that its intended purpose? or for generating?
what would be the appropriate file to use
(this is all the files spat out into .build folder)
https://gist.github.com/johndpope/e4e340fa96483b8eb106794c5278c154

─ Supabase.build
│ │ ├── Supabase-Swift.h
│ │ ├── SupabaseClient.d
│ │ ├── SupabaseClient.swift.o
│ │ ├── SupabaseClient.swiftdeps
│ │ ├── Version.d
│ │ ├── Version.swift.o
│ │ ├── Version.swiftdeps
│ │ ├── master.priors
│ │ ├── master.swiftdeps
│ │ ├── module.modulemap
│ │ └── output-file-map.json
│ ├── Supabase.swiftdoc
│ ├── Supabase.swiftmodule

UPDATE

xcrun swift build -c release --arch arm64 --arch x86_64

I run this - now I get the .o files.

Screen Shot 2022-09-03 at 4 36 23 pm

am I suppose to throw this in.
spm_swift_binary(Supabase.o) ??

UPDATE

_spm_swift_binary_tpl = """
spm_swift_binary(
    name = "{exec_name}",
    packages = "@{repo_name}//:build",
    visibility = ["//visibility:public"],
)
"""
@johndpope johndpope changed the title spm_swift_binary - use local binary spm_swift_binary - use local binary / or how to use local spm files Sep 3, 2022
@johndpope
Copy link
Author

related XCodeBazelize/Bazelize#15

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

No branches or pull requests

1 participant