-
Notifications
You must be signed in to change notification settings - Fork 424
Add support for XcodeProjectPlugin
#1621
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. I just realised that we should update the documentation in both repos though. We should add two things:
- That now the config doesn't need to be at the root of the target anymore since we just search through the sources of a target
- We should state that how it works for an Xcode project.
One thing to note here is that the target directory is now calculated by deleting the last component of the config. So whatever folder the config resides in would become the target directory, and the file paths mentioned in the config should be relative to that. |
That's actually a very important call out! Thanks for stating this. We should clarify this in the Docc docs for the plugins. This is particularly important for the Xcode plugin since there the files can be all over the place. |
@denil-ct could you bring over the changes from protobuf if you get a chance? We'd like to do a release soon and it would be nice to include this change 🙂 |
Hey @glbrntt , got a bit busy. Will make the changes by tomorrow. |
No worries, thank you! |
Hey @glbrntt , I'm facing some troubles verifying my changes. I have this proto file syntax = "proto3";
service NoteService {
rpc Get (NoteRequestId) returns (Note) {}
}
message Note {
string id = 1;
string title = 2;
string content = 3;
}
message NoteRequestId {
string id = 1;
} But after the The plugin tries to execute this command /opt/homebrew/bin/protoc --plugin=protoc-gen-grpc-swift=/${BUILD_DIR}/${CONFIGURATION}/protoc-gen-grpc-swift" --grpc-swift_out=/Users/denilct/Library/Developer/Xcode/DerivedData/ABCApp-gkihnhqrytzfbsbcqflpkdwowxum/SourcePackages/plugins/ABCApp.output/ABCApp/GRPCSwiftPlugin -I /Users/denilct/Documents/ABCApp_2/ABCApp_2 --grpc-swift_opt=Visibility=Public --grpc-swift_opt=Server=false --grpc-swift_opt=Client=true ProtoFiles/Notes/Note.proto |
Are you running the protobuf plugin too? The grpc-swift plugin will only generate the service code, it won't generate the |
Ah, I see. Adding the protobuf plugin fixed it. Thanks. |
You can review the changes. @glbrntt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me but could you run ./scripts/format.sh
to run the formatter so that CI check passes?
Have added the changes done by swift-format. |
Thanks @denil-ct 🙏 |
Carrying over the changes from apple/swift-protobuf#1408
Can anyone point me on how to test these changes for grpc as I'm not very familiar with grpc.