fix: do not generate Version.java files by default#12955
fix: do not generate Version.java files by default#12955diegomarquezp wants to merge 32 commits intomainfrom
Conversation
…ities.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ities.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Removed outdated regex for Version.java and adjusted deep-preserve-regex.
…gleapis/google-cloud-java into fix/version-java-owlbot-yaml
…gleapis/google-cloud-java into fix/version-java-owlbot-yaml
There was a problem hiding this comment.
Code Review
This pull request introduces a generate_version_java flag to control the generation of Version.java files, updating Bazel rules, the Java generator, and hermetic build scripts. It also adds several well-known type proto files for testing. The review feedback correctly identifies that the flag's default value should be changed to False to align with the objective of disabling generation by default and suggests using Collections.emptyList() for more idiomatic and efficient code.
| fi | ||
|
|
||
| if [ -z "${generate_version_java}" ]; then | ||
| generate_version_java="true" |
There was a problem hiding this comment.
The default value for generate_version_java is set to "true", which contradicts the pull request title. It should be set to "false" to ensure that Version.java files are not generated by default in the hermetic build process.
| generate_version_java="true" | |
| generate_version_java="false" |
There was a problem hiding this comment.
This is for our open source library generation, which does require Version.java generation
| - name: Integration Tests | ||
| run: | | ||
| bazelisk --batch test //sdk-platform-java/test/integration/... | ||
| bazelisk --batch test //sdk-platform-java/test/integration/... --test_output=errors |
There was a problem hiding this comment.
that flag is a convenience to understand generation diffs when the generator ITs are failing
There was a problem hiding this comment.
I enabled version.java generation only in some goldens, both in gapic-generator-java and in test/integration
|
|


This prevents self-service libraries from having these files.