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

Support building SPM packages located locally in the repository #60

Closed
acecilia opened this issue Sep 9, 2021 · 0 comments · Fixed by #64
Closed

Support building SPM packages located locally in the repository #60

acecilia opened this issue Sep 9, 2021 · 0 comments · Fixed by #64

Comments

@acecilia
Copy link

acecilia commented Sep 9, 2021

Hey 👋

Thanks for this! ⭐ Was wondering if it is possible to build SPM packages located locally in the repository.

Why would somebody prefer to build a local SPM package with the rules_spm instead of the rules_swift?

  • rules_spm uses SPM for building and does not require creation of BUILD.bazel files
  • Because when you have a Package.swift file, you also get a 100% working xcode project for free. If you use rules_swift and BUILD.bazel files, it is not that clear how to open an xcode project to work on the code

Progress

I have tried this before myself: I created a repository rule to build the swift package with SPM and expose the built outputs to bazel. But so far I figured out this is not so easy due to the lack of support for glob in repository rules. Without glob it is not possible to specify the sources of the package, which are required for building

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

Successfully merging a pull request may close this issue.

1 participant