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
It seems that checkApolloVersions tasks gets two different version names when targeting a specific SNAPSHOT build, resulting in an error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':network:checkApolloVersions'.
> Apollo: All apollo versions should be the same. Found:
[4.1.1-20241209.154106-39, 4.1.1-SNAPSHOT]
Good find! This is because of the apollo-compiler dependency that doesn't know about the "pinned" version (here).
I'm not sure how to fix. We'd need to get access to the "pinned" version at build time. Or maybe just leave the version out and let dependency resolution do its magic 🤔 . I'll dig.
In the meantime, disabling the check works unless you need to test a specific SNAPSHOT version of the compiler. If you do, you'll need to force the version using Gradle APIs. (If you're testing #6309, this only touches apollo-gradle-plugin so apollo-compiler should not matter)
I haven't found a way to make a more general fix work. The SNAPSHOT timestamp is known way too late during the Gradle plugin build and relying on runtime looking up of the requested version seems fragile.
Longer term, that check should probably be moved to a runtime check (like antlr is doing). I have always resisted it because it'd add a version property to every generated query but it's probably not too bad.
Version
4.1.1-SNAPSHOT
Summary
It seems that
checkApolloVersions
tasks gets two different version names when targeting a specificSNAPSHOT
build, resulting in an error.In order to reproduce, use any SNAPSHOT version from here: https://s01.oss.sonatype.org/content/repositories/snapshots/com/apollographql/apollo/apollo-compiler/4.1.1-SNAPSHOT/
Using
apollo = '4.1.1-SNAPSHOT
works fine.One can disable the task to circumvent this issue temporarily:
The text was updated successfully, but these errors were encountered: