Skip to content

Preserve dependency schema ZIP order in cached codegen - #980

Merged
iuliiasobolevska merged 1 commit into
masterfrom
fix/schema-jar-order-cache-key
Oct 6, 2026
Merged

iuliiasobolevska merged 1 commit into
masterfrom
fix/schema-jar-order-cache-key

Conversation

@iuliiasobolevska

Copy link
Copy Markdown
Collaborator

Summary

PR #979 made generateJava cache safe but changed dependency-jar schema parsing from ZIP entry order to entry-name order.
That can reorder generated fields and positional constructor parameters compared with 8.7.0.

Restore ZIP entry order in CodeGen and add the schema entry sequence as a Gradle task input.
Gradle can still reuse cached output when the sequence matches, while a jar repacked in a different order gets a different cache key because its generated output can differ.
The existing cache keys for filesystem and dependency-jar path order remain in place.

Validation

  • SchemaMergingTest verifies field and constructor parameter order for both ZIP sequences.
  • GenerateJavaTaskBuildCacheTest verifies that a reordered jar executes generation, restoring the original sequence retrieves cached output and project-produced jars work under the configuration cache.
  • Focused core and plugin tests, validatePlugins and git diff --check passed on Gradle 9.4.1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@iuliiasobolevska
iuliiasobolevska merged commit fec83bc into master Oct 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants