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 support for a file listing expected package to objc prefixes for validation. #571
Conversation
thomasvl
commented
Jul 7, 2015
- Add a env var to pass a set of expected prefixes for validation.
- Report warnings/errors based on the expected prefixes vs. the data in the files compiled.
- Use some helpers from common directory.
then issue warnings and/or errors if the data in the proto files being generated | ||
is not listed in the expectations file. The format for the file is: | ||
|
||
- An entry is done via `package=prefix`. |
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.
Can we use something like protobuf text format instead? This avoid creating a parser for the configurations.
Also before this change, generators are deterministic solely on the parsed descriptor protos. This change will add additional input to the protoc. I'd rather explore other options before committing to this approach.
For this PR, there is still one small concern: is it to possible to make the introduced macro not visible to normal developers? Or at least change the name to infer that should not be used by normal developers? |
Which macro? I didn't think I introduced a macro. If you mean the env variable, devs should be able to find/use it since it helps ensure their proto files are consistent with respect to package -- objc prefix usage. |
8695307
to
a421289
Compare
For now, can we not mention this in README? Because the config file format and the way to trigger this feature (env, protoc argument, plugin argument) is subject to change in future. |
…validation. - Add a env var to pass a set of expected prefixes for validation. - Report warnings/errors based on the expected prefixes vs. the data in the files compiled. - Use some helpers from common directory.
a421289
to
4e43931
Compare
Removed from the README |
LGTM |
I guess the jruby tests are still flaky but not marked as such? I can't say I see how my cl failed them. |
fyi - the change passed when i pushed it to my repo - https://travis-ci.org/thomasvl/protobuf/builds/75640395 |
Add support for a file listing expected package to objc prefixes for validation.
Fix directly using Buffer instead of util.Buffer