Add prefix_to_proto_package_mappings_path ObjC option.#9498
Merged
thomasvl merged 1 commit intoprotocolbuffers:masterfrom Feb 23, 2022
Merged
Add prefix_to_proto_package_mappings_path ObjC option.#9498thomasvl merged 1 commit intoprotocolbuffers:masterfrom
thomasvl merged 1 commit intoprotocolbuffers:masterfrom
Conversation
677ff13 to
0e1ab8f
Compare
0e1ab8f to
0b1f8c6
Compare
dnkoutso
commented
Feb 12, 2022
0b1f8c6 to
41e2a26
Compare
dnkoutso
commented
Feb 12, 2022
41e2a26 to
d3e2d62
Compare
Contributor
|
FYI I won't be able to really look until about the 22nd. Taking some time off. |
Contributor
Author
|
no worries, thank you so much for your time @thomasvl ! |
thomasvl
reviewed
Feb 22, 2022
thomasvl
reviewed
Feb 22, 2022
492f35b to
7f993c2
Compare
6c19c25 to
72b485a
Compare
dnkoutso
commented
Feb 23, 2022
72b485a to
697c45c
Compare
697c45c to
7f747ff
Compare
dnkoutso
commented
Feb 23, 2022
| } | ||
|
|
||
| std::string PrefixModeStorage::prefix_from_proto_package_mappings(const FileDescriptor* file) { | ||
| if (!file) { |
Contributor
Author
There was a problem hiding this comment.
We actually do need the file here as we perform some logic below to figure out the package to use.
Contributor
There was a problem hiding this comment.
I think I had commented not about the passing of file, but the passing of it by reference so it can't be nullptr.
Contributor
Author
|
@thomasvl I updated all logic! Let me know if there is anything else for me to change or address! |
thomasvl
approved these changes
Feb 23, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey @thomasvl in the previous PR we introduced the
default_objc_class_prefixobjc_opt.However, upon using it it had a major flaw. We have protos that we generate this prefix for for namespacing and it is not always the same. Upon using this, we realized that objc class prefix passed was also used when generating code for dependencies which was causing compilation issues. In other words, it was applied globally. This might be OK if anyone decides to use the same prefix for all protos so maybe we can keep that option as well?
I figured anyone can generate a map with the same prefix across all proto files if they desire to do so.
This is basically a different solution to #9469