You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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
andmetadata.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 generateir.json
andmetadata.json
in a deterministic manner.Steps to reproduce the behavior
No response
Logs
No response
The text was updated successfully, but these errors were encountered: