cowwoc commented on PR #394: URL: https://github.com/apache/maven-build-cache-extension/pull/394#issuecomment-3379525987
## Updates Based on Reviewer Feedback I've improved this PR to address the concerns raised by @AlexanderAshitkin in [PR #176's review](https://github.com/apache/maven-build-cache-extension/pull/176#discussion_r1732039886): ### Code Improvements 1. **Added detailed inline comments** explaining: - Why bookkeeping reset is necessary (prevents stale artifacts in multi-module builds) - That outputs are attached for ALL lifecycle phases (including compile-only) - How this addresses the JPMS module descriptor restoration issues 2. **Added debug logging** to make compile-only cache saves visible in build logs 3. **Enhanced PR description** with: - Clear explanation of how this implements the "pre-compile phase" suggestion - Root cause analysis comparing before/after behavior - Explicit mapping to the reviewer's feedback ### Addressing "Save/Restore Consistency" The reviewer's concern about consistency between save and restore operations is addressed: **Save side (this PR):** - Always attaches configured outputs (`classes`, `test-classes`, etc.) - Creates cache entries that contain all necessary artifacts for restoration **Restore side (existing code):** - Restores attached outputs based on configuration (`isRestoreGeneratedSources()`) - The configuration controls what gets restored, not what gets saved This design ensures: - ✅ Compile-only builds can be restored by subsequent builds - ✅ Users retain control over restoration behavior via configuration - ✅ No cache entries are created without necessary outputs ### Testing The integration test validates the complete workflow: ```bash ./mvnw -Prun-its -Dit.test=Issue393CompileRestoreTest verify ``` Test coverage includes: - JPMS module descriptors (`module-info.class`) - Multi-module projects with inter-module dependencies - Compile-only → verify workflow (the reported bug scenario) -- 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]
