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 support for a file listing expected package to objc prefixes for validation. #571

Merged
merged 1 commit into from Aug 14, 2015

Conversation

thomasvl
Copy link
Contributor

@thomasvl 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`.
Copy link
Contributor

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.

@TeBoring TeBoring modified the milestone: 3.0.0-beta-1 Jul 9, 2015
@TeBoring
Copy link
Contributor

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?

@thomasvl
Copy link
Contributor Author

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.

@TeBoring
Copy link
Contributor

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.
@thomasvl
Copy link
Contributor Author

Removed from the README

@TeBoring
Copy link
Contributor

LGTM

@thomasvl
Copy link
Contributor Author

I guess the jruby tests are still flaky but not marked as such? I can't say I see how my cl failed them.

@thomasvl
Copy link
Contributor Author

fyi - the change passed when i pushed it to my repo - https://travis-ci.org/thomasvl/protobuf/builds/75640395

TeBoring added a commit that referenced this pull request Aug 14, 2015
Add support for a file listing expected package to objc prefixes for validation.
@TeBoring TeBoring merged commit 5c370cc into protocolbuffers:master Aug 14, 2015
@thomasvl thomasvl deleted the validation_support branch September 30, 2015 14:04
taoso pushed a commit to taoso/protobuf that referenced this pull request Aug 1, 2018
adellahlou pushed a commit to adellahlou/protobuf that referenced this pull request Apr 20, 2023
Fix directly using Buffer instead of util.Buffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants