-
Notifications
You must be signed in to change notification settings - Fork 655
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
Build fails after schema file rename when Gradle configuration cache enabled #5455
Labels
Comments
Thanks for opening this 🙏 Linking #5221 as I think they share the same root cause. |
martinbonnin
added a commit
that referenced
this issue
Jan 29, 2024
martinbonnin
added a commit
that referenced
this issue
Jan 29, 2024
martinbonnin
added a commit
that referenced
this issue
Feb 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.8.2 and 4.0.0-beta.3
Summary
Currently build fails if you rename schema file and configuration cache was enabled. Take a look at the steps to reproduce issue below.
My current workaround
I have little bit investigated this and it seems the problem in the following code (schema files searched in a non-compatible way with configuration cache)
apollo-kotlin/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/DefaultApolloExtension.kt
Lines 965 to 970 in 84f0f92
To workaround this, I set
Service.schemaFiles
directly instead of relying on default behavior.apollo-kotlin/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/api/Service.kt
Line 83 in 84f0f92
PS: since in my project I have multiple schema files, I cannot use just
Service.schemaFile
for single fileSteps to reproduce the behavior
Steps
my_lib
module and use default configuration for Apollo plugin. Place GQL schema file into main sources:/Users/user/projects/sample/my_lib/src/main/graphql/schema.graphqls
./gradlew :my_lib:assembleDebug --configuration-cache
schema.graphqls
toschema2.graphqls
./gradlew :my_lib:assembleDebug --configuration-cache
Actual result
The second build fails with error
Expected result
Build must success
Logs
No response
The text was updated successfully, but these errors were encountered: