ci/docker_utils/RSYNC_FIX.md
Docker compilations (bash compile --docker esp32s3) were always rebuilding files, even when nothing changed. This caused:
The issue was in the rsync commands that sync files from host → Docker container (ci/compiler/docker_manager.py:489-538).
rsync -a --checksum --delete /host/src/ /fastled/src/
The problem:
-a (archive mode) includes -t flag → preserves timestamps from source--checksum detects content changes correctly ✓Host (Windows)
↓ rsync with -a flag
/fastled/ in container (timestamps updated from host)
↓ dirsync (via source_manager.py)
PlatformIO build dirs (.pio/build/)
↓ PlatformIO checks timestamps
REBUILD TRIGGERED (unnecessary!)
Added --no-t flag to all rsync commands:
rsync -a --no-t --checksum --delete /host/src/ /fastled/src/
How --no-t fixes it:
--checksum)--checksum: Compare MD5 checksums instead of timestamps (detects real changes)--no-t: Do NOT update destination timestamps when content is unchanged--delete: Remove destination files that don't exist in source-a (minus -t): Still preserves permissions, ownership, etc.An additional concern was line ending differences (CRLF vs LF) causing spurious syncs:
.gitattributes: Enforces eol=lf for all text files.editorconfig: Provides editor-level LF enforcement (newly added)core.autocrlf=input: Git keeps LF in working directory--checksum compares byte-for-byte, so CRLF ≠ LFCurrent status: ✓ All files have LF, no CRLF detected
# First build (will compile everything)
bash compile --docker esp32s3 --examples Blink
# Second build (should skip unchanged files)
bash compile --docker esp32s3 --examples Blink
Expected: Second build should be much faster, showing "up to date" messages
# Start a container manually
docker run -it --rm \
-v "$(pwd)://host:ro" \
niteris/fastled-compiler-esp-32s3:latest \
bash
# Inside container, run diagnostic
bash /host/ci/docker_utils/diagnose_sync.sh
Expected: Should show "No changes detected" for all directories
# On host (Windows)
python -c "
import pathlib
files = ['src/FastLED.h', 'examples/Blink/Blink.ino']
for f in files:
content = pathlib.Path(f).read_bytes()
has_crlf = b'\r\n' in content
print(f'{f}: CRLF={has_crlf}')
"
Expected: All files should show CRLF=False
ci/compiler/docker_manager.py:
--no-t to 5 rsync commands (lines 490, 504, 516, 527, 538).editorconfig (new file):
end_of_line = lf across all text filesci/docker_utils/diagnose_sync.sh (new file):
ci/docker_utils/RSYNC_FIX.md (this file):
Run this command to verify the fix is in place:
grep -n "rsync.*--no-t.*--checksum" ci/compiler/docker_manager.py
Should return 5 matches showing all rsync commands have --no-t flag.
The dirsync calls in source_manager.py are not affected by this issue
Docker mounts on Windows can have timestamp quirks due to: