Update version in the Gradle model#6428
Conversation
|
Thanks a lot for helping explore these failures to detect duplicates. Taking into account your comment here I'll also tag Shannon and Sam for review.
|
| .containsOnlyOnce("tools.jackson.core:jackson-databind:3") | ||
| .doesNotContain("datatype") |
There was a problem hiding this comment.
For context: without the above changes we saw jackson-databind:3 duplicated twice, as both map to the new artifact & version.
|
So most of the recipes compute the new version during the actual edit itself, then reuses the resolved version to modify all configurations. Otherwise, the fix seems reasonable. |
|
@timtebeek I think this should be okay to go in as is more or less. The AST changes are in visitMethodInvocation etc hence we cannot update the GradleProject model right away. Changes can be accumulated and then applied at the sourcefile visit then we'd need to have calls to record the updates etc. I think it is fine the way it is implemented now (other ChangeXXX recipe behave the same) the versions are cached since pom metadata is cached |
There was a problem hiding this comment.
Thanks for the help here @BoykoAlex ! Seems reasonable from my side, as the version resolves you've added are conditional, and wrapped in an update to a cached transient field to limit how often these get called. I've asked Shannon whether that's acceptable to him as well.
Update: discussed in Slack; decided to move forward. Thanks both!
Update new dependency version in the model