build: drop /XO from robocopy auto-deploy#2417
Conversation
## Summary
- Drop `/XO` (eXclude Older) from the three robocopy invocations under
`AUTO_PLUGIN_DEPLOYMENT` so changed source files actually reach the
install
- Update inline comments to document the trap (any prior touch to dest
can give it a newer mtime than git-checkout source, which silently
disables deploy)
## Why
`/XO` skips files where source is older than dest. In a normal git
workflow that's usually safe — but as soon as anything *else* touches
the destination (a manual `cp` during debugging, a package install, even
a previous build that ran later in wall time than the source's git
checkout), dest gets a newer mtime and `/XO` then refuses to overwrite
even when the source file's **size and content** have changed.
## Concrete failure that prompted this
While debugging SLF I had RunGrass.hlsl fixed in source (commit
`f11bfaa32`, source size 33287 bytes with the corrected ShadowSampling
include order), but the deployed file stayed at the previous 31877 bytes
across multiple full builds. Mtime on dest (from a manual `cp` during
earlier diagnostics) was newer than the git-checkout mtime on source, so
`/XO` skipped the copy. Grass and Particle pixel shaders failed to
compile in-game:
> `LightLimitFix/LightLimitFix.hlsli(85,3-28): error X3000: unrecognized
identifier 'DirectionalShadowLightData'`
Same shape of bug can hit any contributor who: tests a package install
over their dev build, copies files manually for any reason, or just has
clock skew across filesystem boundaries.
## What this changes
| Before | After |
|---|---|
| \`/E /XD ... /COPY:DAT /XO /R:1 /W:1 ...\` | \`/E /XD ... /COPY:DAT
/R:1 /W:1 ...\` |
Without `/XO`, robocopy uses its default name + size + timestamp delta —
copies whenever **any** of those differ. Catches both newer-source and
size-mismatch cases. The git-HEAD-change block above the deploy commands
already clears AIO and deploy stamps on branch switch, so the
bulk-redeploy story is unchanged.
## Trade-off
The property `/XO` nominally provided ("don't clobber files the user
intentionally edited in-game between builds at the same HEAD") was
fragile anyway — broken by any external touch to dest. Removing it costs
~100ms of extra IO per build on unchanged files (robocopy still skips
matching name+size+timestamp). Correctness wins.
## Test plan
- [ ] \`BuildRelease.bat ALL-WITH-AUTO-DEPLOYMENT\` produces a deployed
install that matches \`build/<preset>/aio\` byte-for-byte
- [ ] Manually \`touch\` a file in the deployed install to give it a
newer mtime, rebuild, confirm the source file overwrites it
- [ ] Verify unchanged files still skip on subsequent builds (robocopy's
default behavior)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Adjusted Windows plugin deployment configuration to improve
synchronization between deployed and built files. Updated build system
documentation comments.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/alandtse/open-shaders/pull/37?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates the ChangesRobocopy Deployment Flag Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No actionable suggestions for changed features. |
|
✅ A pre-release build is available for this PR: |
Summary
/XO(eXclude Older) from the three robocopy invocations underAUTO_PLUGIN_DEPLOYMENTso changed source files actually reach the installWhy
/XOskips files where source is older than dest. In a normal git workflow that's usually safe — but as soon as anything else touches the destination (a manualcpduring debugging, a package install, even a previous build that ran later in wall time than the source's git checkout), dest gets a newer mtime and/XOthen refuses to overwrite even when the source file's size and content have changed.Concrete failure that prompted this
While debugging SLF I had RunGrass.hlsl fixed in source (commit
f11bfaa32, source size 33287 bytes with the corrected ShadowSampling include order), but the deployed file stayed at the previous 31877 bytes across multiple full builds. Mtime on dest (from a manualcpduring earlier diagnostics) was newer than the git-checkout mtime on source, so/XOskipped the copy. Grass and Particle pixel shaders failed to compile in-game:Same shape of bug can hit any contributor who: tests a package install over their dev build, copies files manually for any reason, or just has clock skew across filesystem boundaries.
What this changes
Without
/XO, robocopy uses its default name + size + timestamp delta — copies whenever any of those differ. Catches both newer-source and size-mismatch cases. The git-HEAD-change block above the deploy commands already clears AIO and deploy stamps on branch switch, so the bulk-redeploy story is unchanged.Trade-off
The property
/XOnominally provided ("don't clobber files the user intentionally edited in-game between builds at the same HEAD") was fragile anyway — broken by any external touch to dest. Removing it costs ~100ms of extra IO per build on unchanged files (robocopy still skips matching name+size+timestamp). Correctness wins.Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit