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

add protoc-gen-swift to Makefile to update proto files for opentelemetry-swift #396

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vvydier
Copy link

@vvydier vvydier commented May 26, 2022

I would like to add a gen-swift task in the Makefile, so we can update the protobuf files for opentelemetry-swift when a change happens in the proto repo:
How do I add the swift's protoc (https://github.com/apple/swift-protobuf) in the build process. Looks like its using the docker image otel/build-protobuf . I get this error when I run make gen-swift

Please specify a program using absolute path or make sure the program is available in your PATH system variable
--swift_out: protoc-gen-swift: Plugin failed with status code 1.
make: *** [gen-swift] Error 1

The build is using a docker image otel/build-protobuf:0.9.0 which has protoc for other languages but not one for swift. How do I add swift's protoc (https://github.com/apple/swift-protobuf) so we can use it to build the protobuf files for swift as well?

Thanks

@vvydier vvydier requested a review from a team as a code owner May 26, 2022 15:13
@bogdandrutu
Copy link
Member

@vvydier the docker image that we use is generated from https://github.com/open-telemetry/build-tools/tree/main/protobuf, so go ahead and change the Dockerfile to include swift support.

@tigrannajaryan
Copy link
Member

This looks stale. Is this still in progress?

@vvydier vvydier closed this Oct 20, 2022
@vvydier vvydier reopened this Oct 20, 2022
@vvydier
Copy link
Author

vvydier commented Oct 20, 2022

I didnt realize that I had already requested the protoc compiler addition in the Dockerfile some time back.
What do I need to get this approved and be added so we can compile protobuf files for the opentelemetry-swift project whenever there is an update. THanks

@vvydier
Copy link
Author

vvydier commented Nov 1, 2022

The docker image for build is based on alpine linux https://github.com/open-telemetry/build-tools/blob/main/protobuf/Dockerfile#L1 and there is no distribution of swift on alpine linux. There is swift for ubuntu, centos and amazon linux https://www.swift.org/blog/additional-linux-distros/ so this method will not work for using the grpc-plugin for swift, unbless we switch to a docker that uses a base image that swift is supported on. @tigrannajaryan

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

Successfully merging this pull request may close these issues.

None yet

4 participants