Gabriel39 commented on code in PR #69969:
URL: https://github.com/apache/doris/pull/69969#discussion_r4441179024
##########
build.sh:
##########
@@ -1189,6 +1189,23 @@ function build_fe_modules() {
return 1
}
+function stamp_fe_build_version() {
+ local
version_java="${DORIS_HOME}/fe/fe-common/target/generated-sources/build/org/apache/doris/common/Version.java"
+ local version_classes="${DORIS_HOME}/fe/fe-common/target/build-version"
+ local common_jar
+
+ # A Maven cache hit can restore fe-common with another commit's
Version.class.
+ # Stamp only the deployed jar so volatile build metadata does not
invalidate the FE cache.
+ # Cached outputs can restore Version.java too, so regenerate after
restoration.
+ rm -f "${version_java}"
+ bash "${DORIS_HOME}/gensrc/script/gen_build_version.sh"
+ mkdir -p "${version_classes}"
+ "${JAVA_HOME}/bin/javac" --release 17 -encoding UTF-8 -d
"${version_classes}" "${version_java}"
Review Comment:
Fixed in 2d6c422daaa. Version stamping retains JAVA_HOME precedence and
otherwise resolves javac and jar through PATH, matching env.sh. The generator
test invokes the actual packaging function with JAVA_HOME and JDK_17 unset,
verifies both PATH-selected tools are used, and executes a cached consumer
against the refreshed jar. It fails on the previous implementation because
javac bypasses PATH and passes with the fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]