Repository navigation
Build: keep generated version state reproducible - #519
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
60d2ae5 to
f6bd5c3
Compare
Narflex
left a comment
There was a problem hiding this comment.
This one I've noticed can be a problem, so I'm fine with this change...but the line endings modification shouldn't be part of that (and I'm not aware of an actual problem with line endings, so I'm not a fan of that change).
There was a problem hiding this comment.
The line endings has nothing to do with this actual change, remove this new file please.
There was a problem hiding this comment.
• The branch now contains only the build.gradle lifecycle fix; .gitattributes and the unrelated trailing-line change are gone. I’m running the focused compileJava reproduction to prove the generated Sage constants are restored and no backup or tracked-source modification remains. I’m auditing every remaining open PR now and will remove or isolate unrelated line-ending changes anywhere they are not essential to that PR’s demonstrated problem. The focused #519 build is still completing.
f6bd5c3 to
089984e
Compare
|
Agreed. I removed the new The PR now changes only I also audited every other open PR for the same issue. Only the broader draft #529 contained a smaller |
Summary
SageConstants.javabuild-version state after buildsWhy
The build-number task rewrites a tracked Java source file. Without deterministic restoration, a successful build can leave a dirty worktree and accidentally include generated version state in a later commit.
Reproduction
compileJavawithout completingsageJar.git status,SageConstants.java, andSageConstants.java.bak.Before this change, restoration is finalized only by
sageJar, and backup deletion is deferred withdeleteOnExit. Other successful compile paths can therefore leave generated state or its backup behind until JVM exit or later.After this change,
compileJava.finalizedBy restoreSageConstantsrestores the tracked source after every compile path. Backup deletion occurs immediately and fails visibly if it cannot complete.Validation
gradlew compileJava --no-daemoncompleted successfullySageConstants.javaSHA-256 was identical before and after compilationSageConstants.java.bakdid not remain after the buildsageJargates passedcheck-changesandcla/googlepassScope and risk
This PR now changes only
build.gradle: four inserted lines and two removed lines. The unrelated.gitattributesfile and all line-ending policy have been removed. It does not change runtime Java behavior, packaging, deployment, Vibe workflows, or container policy.Review state
Small maintenance change; ready for individual review.
Current-Ubuntu container dependency
This is one of four independent Core approvals needed before proposing the current-Ubuntu runtime image to
OpenSageTV/sagetv-dockers: #516 launcher behavior, #519 reproducible source-clean builds, #528 current GCC/64-bit native compatibility, and the separable Ubuntu/ImageLoader portions of #529. This PR is a build-integrity prerequisite rather than a runtime/GPU behavior change.