* Remove javanano from .gitignore.
Ignore java/lite/target
* Resolve more java field accessor name conflicts.
Previously, some proto field names would cause the java code generator to generate accessor names that conflict with method names from the message super classes/interfaces.
A list of field names that cause such conflicts previously existed, but the list did not contain every field name that would cause a conflict.
Additionally, only snake_case field names would be detected. If the field name was in camelCase, the conflict would not be detected.
This change adds the complete set of field names that will cause assessor name conflicts, and detects conflicts in both snake_case and camelCase field names.
Fixes#8142
* Prevent java accessor name conflicts for fields with leading underscores.
Previously, some protobuf field names beginning with leading underscores (e.g. _class) would cause uncompilable java code to be generated due to assessor name conflicts.
Now, non-conflicting java accessor method names are created for those fields
* Improve comments/documentation for conversion from snake case to camel case
Rename snakeCaseToCamelCase to snakeCaseToLowerCamelCase
Add snakeCaseToUpperCamelCase
Add clarifying in-line comments for field name generation
Remove explicit version numbers from references.
* Fix indents and typo
* Unnest <pre> tag
* improve grammar in comments
are colliding -> collide
* Remove ternary operator and improve comments
* Fix typo in comment
Otherwise in C++20 / VisualStudio 2022 the following warning is emitted:
```
warning C5054: operator '*': deprecated between enumerations of different types
```
For build systems that don't allow someone to easily add in generator args,
support env variables for the values.
Most the bool env var support to a helper since it is used in three places now.
This change includes just a couple small tweaks:
- Keep line lengths under 80 characters
- Fully qualify google::protobuf::Any so that the code still compiles
internally where we use a different namespace.
When a file doesn't have a proto package, allow validation to still be supported
via entries with that consist of 'no_package:FILE'. This allows someone using an
expected prefixes file to also list these exceptional cases, and allows them to
becomes error cases with requiring all prefixes to be registered.
* Fix comment syntax in any.proto
Remove extra spaces which cause incorrect indentation in godoc.
Remove the "====" style title which is not rendered by godoc.
* Run ./generate_descriptor_proto.sh
Our internal version of the codebase has a different path and package
name for descriptor.proto, so this change updates IsDescriptorProto()
and IsDescriptorOptionMessage() to be able to handle both the internal
and external descriptor types.
The Descriptor class now has map_key() and map_value() methods for
accessing the special key and value fields in generated map entry
messages. This commit updates all the relevant code to use these
accessors instead of the clunkier FindFieldByName("key") or
FindFieldByName("value") approach.
This is based on @haberman's changes in #8257. Now that we're using
std::mutex we no longer need to check whether pthreads are available, so
this commit removes references to HAVE_PTHREAD. I left the autotools
build alone, though, since we are likely to drop support for it soon
anyway.