Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftProtobufPlugin misses protoc binaryTarget dependency #1409

Open
olegsur opened this issue Jun 20, 2023 · 4 comments
Open

SwiftProtobufPlugin misses protoc binaryTarget dependency #1409

olegsur opened this issue Jun 20, 2023 · 4 comments

Comments

@olegsur
Copy link

olegsur commented Jun 20, 2023

SwiftProtobufPlugin requires protoc dependency, however this dependency is not set in the Package.swift. It looks like some improvements were implemented in swift 5.6 which "should" make it possible.

@FranzBusch
Copy link
Contributor

That proposal alone is not enough since there wasn't a possibility to vend binary targets as products. However this PR apple/swift-package-manager#5810 added capabilities for this.
In general, we can't vend protoc from the repository since it might be used by other packages which do not require protobuf generation. I would recommend opening an issue over in the protocolbuffers repository where you ask them to add a Package.swift that vends protoc. The protobuf team can then decide if they want to do this. More specifically they can decide if they want to vend a binary artefact or build protoc via SPM.

@olegsur
Copy link
Author

olegsur commented Jun 20, 2023

It does not look like that protocolbuffers repository should have Package.swift because protoc is not a Swift package. But it would be nice if they add this support. Here the issue.

@FranzBusch
Copy link
Contributor

@olegsur If something is a Swift package or not is not relevant for this. SPM can also build C and C++ targets. An example of this is zstd.

@olegsur
Copy link
Author

olegsur commented Jun 20, 2023

@FranzBusch You are right, it should be irrelevant if protobuf is a Swift package or not. This is a question about who should be responsible for creating binary build artifact which could be used by SPM. I hope, the protobuf team will accept the feature request.

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

No branches or pull requests

2 participants