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

[Dependency Updates] Update squareupOkioVersion to 3.2.0 #18113

Merged
merged 2 commits into from
Apr 26, 2023

Conversation

ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Mar 15, 2023

Parent #17568

This PR updates squareupOkioVersion to 3.2.0.


Note that the latest 3.3.0 update requires Kotlin version 1.8.0. However, this project is currently compiled against Kotlin version 1.6.10.

Thus, until the kotlinVersion of this project gets updated to 1.8.0 updating to 3.3.0 isn't possible (see error below).

More details
> Task :WordPress:kaptGenerateStubsJetpackWasabiDebugKotlin FAILED
e: java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type: ErrorScope{Error scope for class <ERROR CLASS> with arguments: org.jetbrains.kotlin.types.IndexedParametersSubstitution@4bb62c06}
[ERROR : ArrayList<CategoryNode>]
        at org.jetbrains.kotlin.types.SimpleTypeImpl.<init>(KotlinTypeFactory.kt:225)
        at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(KotlinTypeFactory.kt:155)
        at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType(KotlinTypeFactory.kt:82)
        at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType$default(KotlinTypeFactory.kt:71)
        at org.jetbrains.kotlin.types.TypeSubstitutionKt.replace(TypeSubstitution.kt:167)
        at org.jetbrains.kotlin.types.TypeSubstitutionKt.replace(TypeSubstitution.kt:152)
        at org.jetbrains.kotlin.types.TypeSubstitutionKt.replace$default(TypeSubstitution.kt:140)
        at org.jetbrains.kotlin.kapt3.util.TypeUtilsKt.replaceAnonymousTypeWithSuperType(typeUtils.kt:53)
        at org.jetbrains.kotlin.kapt3.KaptAnonymousTypeTransformer.transformAnonymousType(KaptAnonymousTypeTransformer.kt:27)
        at org.jetbrains.kotlin.resolve.DescriptorResolver.transformAnonymousTypeIfNeeded(DescriptorResolver.java:1037)
        at org.jetbrains.kotlin.resolve.DescriptorResolver.lambda$inferReturnTypeFromExpressionBody$4(DescriptorResolver.java:1244)
        at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:408)
        at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:527)
        at org.jetbrains.kotlin.types.DeferredType.getDelegate(DeferredType.java:106)
        at org.jetbrains.kotlin.types.WrappedType.getAnnotations(KotlinType.kt:126)
        at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:108)
        at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.doForceResolveAllContents(ForceResolveUtil.java:95)
        at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:42)
        at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:52)
        at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:47)
        at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.doForceResolveAllContents(LazyClassDescriptor.java:643)
        at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.lambda$new$4(LazyClassDescriptor.java:218)
        at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:408)
        at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.forceResolveAllContents(LazyClassDescriptor.java:631)
        at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.doForceResolveAllContents(ForceResolveUtil.java:78)
        at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:42)
        at org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension$doAnalysis$1.invoke(PartialAnalysisHandlerExtension.kt:72)
        at org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension$doAnalysis$1.invoke(PartialAnalysisHandlerExtension.kt:67)
        at org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension.doForEachDeclaration(PartialAnalysisHandlerExtension.kt:123)
        at org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension.doForEachDeclaration(PartialAnalysisHandlerExtension.kt:138)
        at org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension.doAnalysis(PartialAnalysisHandlerExtension.kt:67)
        at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.doAnalysis(Kapt3Extension.kt:152)
        at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:120)
        at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:96)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:262)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:53)
        at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:113)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:253)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:100)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:58)
        at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:170)
        at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
        at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
        at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:434)
        at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:120)
        at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:357)
        at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:299)
        at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:118)
        at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:169)
        at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:80)
        at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:622)
        at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:100)
        at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1713)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
        at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)

e: /Users/petros.paraskevopoulos/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio-jvm/3.3.0/2d175add2d06a67bda111ae5455e49b42d0bb287/okio-jvm-3.3.0.jar!/META-INF/okio.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/petros.paraskevopoulos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.8.0/f7197e7cc76453ac59f8b0f8d5137cc600becd36/kotlin-stdlib-common-1.8.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/petros.paraskevopoulos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.0/1796921c7a3e2e2665a83e6c8d33399336cd39bc/kotlin-stdlib-1.8.0.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/petros.paraskevopoulos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.0/1796921c7a3e2e2665a83e6c8d33399336cd39bc/kotlin-stdlib-1.8.0.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /Users/petros.paraskevopoulos/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.0/1796921c7a3e2e2665a83e6c8d33399336cd39bc/kotlin-stdlib-1.8.0.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':WordPress:kaptGenerateStubsJetpackWasabiDebugKotlin'.
> Internal compiler error. See log for more details


PS: @RenanLukas I added you as the main reviewer, randomly, since I just wanted someone from the WordPress team to be aware of and sign-off on that change for WPAndroid. I also added the @wordpress-mobile/apps-infrastructure team, but this in done only for monitoring purposes, as such, I am not expecting any active review from that team. Thus, feel free to merge this PR if you deem so.


To test:

  1. See the dependency tree diff result and verify correctness.
  2. Thoroughly smoke test any Okio related functionality, on both, the WordPress and Jetpack apps, and see if they both work as expected.
  3. In addition to the above smoke test, you can expand the below and follow the inner and more explicit test steps within:
Me Screen [GravatarApi.java & StreamingRequest.java]
  • While on the My Site tab, click on your profile's icon (top right).
  • From the Me screen you are in, click on your profile's icon (CHANGE PHOTO).
  • Choose an image and wait for the Edit Photo screen to appear.
  • Crop the image and click the done menu option (top right).
  • Verify the image is updated accordingly.

Regression Notes

  1. Potential unintended areas of impact

    • Potential breakage or misbehaviour on any or all Okio related app functionalities, like changing the profile image (gravatar).
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • See To test section above.
  3. What automated tests I added (or what prevented me from doing so)

    • N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Release Notes: https://github.com/square/okio/blob/master/CHANGELOG.md
#version-320

------------------------------------------------------------------------

Note that the latest '3.3.0' update requires Kotlin version 1.8.0.
However, this project is currently compiled against Kotlin version
1.6.10.

Thus, until the 'kotlinVersion' of this project gets updated to '1.8.0'
updating to '3.3.0' isn't possible (see error below).

------------------------------------------------------------------------

e: java.lang.IllegalStateException: SimpleTypeImpl should not be created
for error type: ErrorScope{Error scope for class <ERROR CLASS> with
arguments: org.jetbrains.kotlin.types.IndexedParametersSubstitution
@42489e17}

------------------------------------------------------------------------
@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused the following dependency changes:

 +--- project :libs:analytics
 |    \--- com.automattic:Automattic-Tracks-Android:2.2.0
 |         \--- io.sentry:sentry-android-okhttp -> 5.4.3
 |              \--- com.squareup.okhttp3:okhttp -> 4.9.2
-|                   \--- com.squareup.okio:okio:2.8.0 -> 2.10.0
-|                        +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
-|                        \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20 -> 1.6.21
+|                   \--- com.squareup.okio:okio:2.8.0 -> 3.2.0
+|                        \--- com.squareup.okio:okio-jvm:3.2.0
+|                             +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20 -> 1.6.21 (*)
+|                             \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20 -> 1.6.21
-+--- com.squareup.okio:okio:2.8.0 -> 2.10.0 (*)
++--- com.squareup.okio:okio:3.2.0 (*)
 +--- com.airbnb.android:lottie:5.2.0
-|    \--- com.squareup.okio:okio:1.17.4 -> 2.10.0 (*)
+|    \--- com.squareup.okio:okio:1.17.4 -> 3.2.0 (*)
 \--- io.coil-kt:coil-compose:1.4.0
      \--- io.coil-kt:coil:1.4.0
           \--- io.coil-kt:coil-base:1.4.0
-               \--- com.squareup.okio:okio:2.10.0 (*)
+               \--- com.squareup.okio:okio:2.10.0 -> 3.2.0 (*)

Please review and act accordingly

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 15, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr18113-21a2c79
Commit21a2c79
Direct Downloadwordpress-prototype-build-pr18113-21a2c79.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 15, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr18113-21a2c79
Commit21a2c79
Direct Downloadjetpack-prototype-build-pr18113-21a2c79.apk
Note: Google Login is not supported on these builds.

@ParaskP7 ParaskP7 requested review from RenanLukas and a team March 15, 2023 15:37
@ParaskP7 ParaskP7 marked this pull request as ready for review March 15, 2023 15:38
@ParaskP7
Copy link
Contributor Author

ParaskP7 commented Apr 3, 2023

👋 @RenanLukas !

Apologies for the direct ping, but I wonder if you have the capacity for reviewing and testing this PR. Let me know, and if not, I can assign it to another engineer. I would like to avoid keeping this PR open for much longer, risking it becoming stale.

@ParaskP7 ParaskP7 requested review from thomashorta and removed request for RenanLukas April 25, 2023 08:15
@ParaskP7
Copy link
Contributor Author

👋 @thomashorta @RenanLukas !

Apologies for the direct ping, but I wonder if you have the capacity for reviewing and testing this PR. Let me know, and if not, I can assign it to another engineer. I would like to avoid keeping this PR open for much longer, risking it becoming stale.

Thomás, I randomly assigned you here and unassigned Renan. Let me know if you have the capacity to do a code review on this PR. Feel free to say no and I'll assign someone else instead. Thank you both for your help! 🙏

@RenanLukas
Copy link
Contributor

Hey @ParaskP7 , sorry for the late review.

I've tested both WP and JP and they seem to be working as expected. There's just one thing I wanted to confirm before approving: I've changed my profile picture on JP and it didn't update on WP. I've tried closing the WP app and opening it again, but it was still showing the "old" image. Do you happen to know if this is the expected behavior?

@ParaskP7
Copy link
Contributor Author

👋 @RenanLukas and many thanks for the review and testing, much appreciated! 🙇

I've tested both WP and JP and they seem to be working as expected.

🤞

There's just one thing I wanted to confirm before approving: I've changed my profile picture on JP and it didn't update on WP. I've tried closing the WP app and opening it again, but it was still showing the "old" image. Do you happen to know if this is the expected behavior?

It's been a while, let me update this branch with trunk and check that as well. I'll get back to you asap, thanks for reporting! 🥇

@ParaskP7
Copy link
Contributor Author

👋 @RenanLukas !

It's been a while, let me update this branch with trunk and check that as well. I'll get back to you asap, thanks for reporting! 🥇

Ok, I verified that this is indeed what happens, when you change your profile picture on JP (or WP), it doesn't get updated on WP (or JP). But, this also occurs on trunk and as such this misbehaviour seems to have been there for some time now, as such, it isn't related to this update.

Me testing this even further:

  • I verified that changing the profile picture also updates the profile picture on https://wordpress.com/ . ✅
  • I then also logged-out from the app and logged-in again. This didn't help, the old profile picture persisted. ❌
  • I then cleared the storage on the app and logged-in again. This actually helped, the new profile picture is shown. ✅

All the above means that this isn't a sync (network) issue but rather a local storage (or cache) issue on the JP (WP) app's side, which persists the old profile picture even when the user logs-out (the correct behavior would have been to update the profile picture at least on every app cold, or even hot, start). 🤷

Maybe this finding is worth opening a separate GitHub issue to deal with that at some point in the future, wdyt? 🤔

@RenanLukas
Copy link
Contributor

Thanks for confirming, @ParaskP7. I've created an issue here.

Copy link
Contributor

@RenanLukas RenanLukas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@RenanLukas RenanLukas merged commit 1f8a258 into trunk Apr 26, 2023
@RenanLukas RenanLukas deleted the deps/update-square-okio-to-3.3.0 branch April 26, 2023 16:18
@ParaskP7
Copy link
Contributor Author

Awesome, thanks for reviewing, testing and merging this @RenanLukas , plus thanks for opening the issue, you rock! 🙇 ❤️ 🚀

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

Successfully merging this pull request may close these issues.

3 participants