Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling apollo metadata generation for multi-module codegen causes build cache misses #5917

Closed
rohandhruva opened this issue May 24, 2024 · 2 comments

Comments

@rohandhruva
Copy link
Contributor

Version

4.0.0-beta.6

Summary

We recently enabled multi-module codegen in our project, to modularize our GraphQL usage. After enabling this, we noticed an increase in our build cache misses, and it lined up with when we enabled generateApolloMetadata.set(true).

After some further investigation, it turns out that the generated ir.json and metadata.json files are not deterministic: likely because there is no deterministic ordering in JSON, and kotlinx-serialization does not support ordering either.

We are still investigating this, but for now, it seems like it is enough to mark the ApolloGenerateIrOperationsTask as a @CacheableTask, which is what I've proposed in #5916. In the future, it might be worth considering if we can easily generate ir.json and metadata.json in a deterministic manner.

Steps to reproduce the behavior

No response

Logs

No response

@martinbonnin
Copy link
Contributor

Fixed with #5919

Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants