rules_swift_package_manager
rules_swift_package_manager copied to clipboard
feat: Swift registry support
Fixes #1016
This PR adds support for package registry dependencies, by adding a new build rule type. For a Package.swift dependency like this:
dependencies: [
.package(id: "apple.swift-collections", from: "1.1.0"),
]
A build rule will be generated like this:
swift_registry_package(
name = "swiftpkg_apple.swift_collections",
dependencies_index = "@//:swift_packages_index.json",
id = "apple.swift-collections",
version = "1.1.0",
)
Thank you for the contribution! Let me know what you think about my comment on the issue.
@watt @cgrindel What's needed to land this? Ideally this would be part of 1.0.
What's needed to land this? Ideally this would be part of 1.0.
We just need to understand how this PR changes with swift_update_packages disappearing from rules_swift_package_manager.
What's needed to land this? Ideally this would be part of 1.0.
We just need to understand how this PR changes with
swift_update_packagesdisappearing fromrules_swift_package_manager.
Is this something I can help with? I'd love to land this as it works today and then iterate towards whatever shape 1.0 has, but I don't have a good sense for what that entails.
@watt I just merged #957 which removes the swift_update_packages and some other big changes. Can you rebase this PR from main and raise any issues that you may need help navigating?
Unfortunately the breaking changes in #957 made it impractical for me to continue working on this. I may revisit it at some point once we have migrated to bzlmod.
I am sorry that the recent changes thwarted your efforts. Once the 1.0 release happens, it would be great to pick this up again.