Skip to content

Conversation

@wzieba
Copy link
Contributor

@wzieba wzieba commented Feb 20, 2024

Description

This PR rewrites :libs:processors annotation processor from kapt to ksp, to unblock ksp migration in the whole project.

Please mind that this PR goes into feature branch ksp, not to trunk yet.

To Test:

TC1: Validate if generated classes did not change

  • Passed
  1. Check out ec1baba
  2. Run clean WordPress:kaptWordpressWasabiDebugKotlin
  3. Save the content of generated classes somewhere. Those classes are
    • RemoteFeatureConfigCheck
    • FeaturesInDevelopment
    • RemoteFeatureConfigDefaults
    • RemoteFieldConfigDefaults
  4. Check out this branch
  5. Run clean WordPress:kspWordpressWasabiDebugKotlin
  6. Look for the same classes as above (they'll be in a different directory). Assert that the content of those classes did not change Please mind, that, unfortunately, the order of generated code is different. Hint: you can sort the files e.g. alphabetically to make it easier to compare.

TC2: Incremental processing: add and remove a new development feature

  • Passed
  1. Add a new remote feature class, in any place in the codebase, e.g.
 @FeatureInDevelopment
 class Foobar
  1. Run WordPress:kspWordpressWasabiDebugKotlin
  2. Assert Foobar is present in FeaturesInDevelopment generated file
  3. Remove some @FeatureInDevelopment, e.g. LandOnTheEditorFeatureConfig
  4. Run WordPress:kspWordpressWasabiDebugKotlin
  5. Assert this feature is not present in FeaturesInDevelopment generated file

Other cases

In TC1 we validate content. In TC2 we validate incremental processing logic. Output files for other than @FeaturesInDevelopment annotations have the same setting - aggregating, so there's no strong need to test it.

But if you want to make sure, you can repeat TC2 with other annotations: @Experiment, @Feature and @RemoteFieldDefaultGenerater.


Regression Notes

  1. Potential unintended areas of impact

    • Code generation of classes:
      • RemoteFeatureConfigCheck
      • FeaturesInDevelopment
      • RemoteFeatureConfigDefaults
      • RemoteFieldConfigDefaults
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • I wrote unit tests and smoke tested the app (instructions below)
  3. What automated tests I added (or what prevented me from doing so)


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.

Testing Checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 20, 2024

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
Versionpr20217-3df71cf
Commit3df71cf
Direct Downloadwordpress-prototype-build-pr20217-3df71cf.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 20, 2024

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
Versionpr20217-3df71cf
Commit3df71cf
Direct Downloadjetpack-prototype-build-pr20217-3df71cf.apk
Note: Google Login is not supported on these builds.

This commit brings back behaviour from previous, kapt implementation, of not generating classes if inputs for them are empty.

This solves the problem of generating classes with empty content in different sourceset, e.g. `androidTest`. You can reproduce such problem in 80a80aa
@codecov
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.41%. Comparing base (efb739f) to head (3df71cf).

Additional details and impacted files
@@            Coverage Diff             @@
##              ksp   #20217      +/-   ##
==========================================
+ Coverage   40.37%   40.41%   +0.04%     
==========================================
  Files        1469     1470       +1     
  Lines       67691    67719      +28     
  Branches    11209    11220      +11     
==========================================
+ Hits        27327    27368      +41     
+ Misses      37864    37857       -7     
+ Partials     2500     2494       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused some dependency changes (expand to see details)

 +--- androidx.databinding:viewbinding:8.1.0
 |    \--- androidx.annotation:annotation:1.0.0 -> 1.6.0
 |         \--- androidx.annotation:annotation-jvm:1.6.0
-|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.0 -> 1.9.20
-|                   +--- org.jetbrains:annotations:13.0 -> 23.0.0
-|                   +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.20 (c)
-|                   +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0 -> 1.9.10 (c)
-|                   \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0 -> 1.9.10 (c)
+|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.0 -> 1.9.22
+|                   +--- org.jetbrains:annotations:13.0 -> 23.0.0
+|                   +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0 -> 1.9.10 (c)
+|                   +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0 -> 1.9.10 (c)
+|                   \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22 (c)
++--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
++--- androidx.webkit:webkit:1.10.0
+|    \--- androidx.core:core:1.1.0 -> 1.12.0
+|         +--- androidx.annotation:annotation-experimental:1.3.0 -> 1.3.1
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.9.22 (*)
+|         +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.6.2
+|         |    +--- androidx.lifecycle:lifecycle-common:2.6.2
+|         |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|         |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 -> 1.7.3
+|         |    |         \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
+|         |    |              \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3
+|         |    |                   +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20 -> 1.9.22
+|         |    |                   |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
+|         |    |                   \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20 -> 1.9.10
+|         |    |                        +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 -> 1.9.22 (*)
+|         |    |                        \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
+|         |    |                             \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 -> 1.9.22 (*)
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
++--- androidx.navigation:navigation-compose:2.7.6
+|    +--- androidx.activity:activity-compose:1.7.0 -> 1.8.0
+|    |    +--- androidx.activity:activity-ktx:1.8.0
+|    |    |    +--- androidx.activity:activity:1.8.0
+|    |    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 -> 2.6.2
+|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 -> 2.6.2
+|    |    |    |    |    +--- androidx.core:core-ktx:1.2.0 -> 1.12.0
+|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.6.2
+|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |    |    |    +--- androidx.savedstate:savedstate:1.2.1
+|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    |    |    +--- androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 -> 2.6.2
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1 -> 2.6.2
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |    +--- androidx.savedstate:savedstate-ktx:1.2.1
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    |    +--- androidx.compose.runtime:runtime:1.0.1 -> 1.5.3
+|    |    |    \--- androidx.compose.runtime:runtime-android:1.5.3
+|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    +--- androidx.compose.runtime:runtime-saveable:1.0.1 -> 1.5.3
+|    |    |    \--- androidx.compose.runtime:runtime-saveable-android:1.5.3
+|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    +--- androidx.compose.ui:ui:1.0.1 -> 1.5.3
+|    |    |    \--- androidx.compose.ui:ui-android:1.5.3
+|    |    |         +--- androidx.compose.ui:ui-geometry:1.5.3
+|    |    |         |    \--- androidx.compose.ui:ui-geometry-android:1.5.3
+|    |    |         |         +--- androidx.compose.ui:ui-util:1.5.3
+|    |    |         |         |    \--- androidx.compose.ui:ui-util-android:1.5.3
+|    |    |         |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    |         +--- androidx.compose.ui:ui-graphics:1.5.3
+|    |    |         |    \--- androidx.compose.ui:ui-graphics-android:1.5.3
+|    |    |         |         +--- androidx.compose.ui:ui-unit:1.5.3
+|    |    |         |         |    \--- androidx.compose.ui:ui-unit-android:1.5.3
+|    |    |         |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    |         +--- androidx.compose.ui:ui-text:1.5.3
+|    |    |         |    \--- androidx.compose.ui:ui-text-android:1.5.3
+|    |    |         |         +--- androidx.emoji2:emoji2:1.2.0 -> 1.4.0
+|    |    |         |         |    \--- androidx.lifecycle:lifecycle-process:2.4.1 -> 2.6.2
+|    |    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    |         +--- androidx.customview:customview-poolingcontainer:1.0.0
+|    |    |         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.9.22 (*)
+|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    +--- androidx.compose.animation:animation:1.5.1 -> 1.5.3
+|    |    \--- androidx.compose.animation:animation-android:1.5.3
+|    |         +--- androidx.compose.animation:animation-core:1.5.3
+|    |         |    \--- androidx.compose.animation:animation-core-android:1.5.3
+|    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
+|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |         +--- androidx.compose.foundation:foundation-layout:1.5.3
+|    |         |    \--- androidx.compose.foundation:foundation-layout-android:1.5.3
+|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
+|    +--- androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
+|    +--- androidx.navigation:navigation-runtime-ktx:2.7.6
+|    |    +--- androidx.navigation:navigation-common-ktx:2.7.6
+|    |    |    \--- androidx.navigation:navigation-common:2.7.6
+|    |    |         +--- androidx.collection:collection-ktx:1.1.0
+|    |    |         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.20 -> 1.9.22 (*)
+|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    |    \--- androidx.navigation:navigation-runtime:2.7.6
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
-+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
-|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 -> 1.9.20 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 -> 1.9.20 (*)
-+--- androidx.webkit:webkit:1.10.0
-|    \--- androidx.core:core:1.1.0 -> 1.12.0
-|         +--- androidx.annotation:annotation-experimental:1.3.0 -> 1.3.1
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.9.20 (*)
-|         +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.6.2
-|         |    +--- androidx.lifecycle:lifecycle-common:2.6.2
-|         |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|         |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 -> 1.7.3
-|         |    |         \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3
-|         |    |              \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3
-|         |    |                   +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20 -> 1.9.20
-|         |    |                   |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
-|         |    |                   \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20 -> 1.9.10 (*)
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-+--- androidx.navigation:navigation-compose:2.7.6
-|    +--- androidx.activity:activity-compose:1.7.0 -> 1.8.0
-|    |    +--- androidx.activity:activity-ktx:1.8.0
-|    |    |    +--- androidx.activity:activity:1.8.0
-|    |    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 -> 2.6.2
-|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 -> 2.6.2
-|    |    |    |    |    +--- androidx.core:core-ktx:1.2.0 -> 1.12.0
-|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-|    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.6.2
-|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |    |    |    +--- androidx.savedstate:savedstate:1.2.1
-|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-|    |    |    +--- androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 -> 2.6.2
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1 -> 2.6.2
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |    +--- androidx.savedstate:savedstate-ktx:1.2.1
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-|    |    +--- androidx.compose.runtime:runtime:1.0.1 -> 1.5.3
-|    |    |    \--- androidx.compose.runtime:runtime-android:1.5.3
-|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    +--- androidx.compose.runtime:runtime-saveable:1.0.1 -> 1.5.3
-|    |    |    \--- androidx.compose.runtime:runtime-saveable-android:1.5.3
-|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    +--- androidx.compose.ui:ui:1.0.1 -> 1.5.3
-|    |    |    \--- androidx.compose.ui:ui-android:1.5.3
-|    |    |         +--- androidx.compose.ui:ui-geometry:1.5.3
-|    |    |         |    \--- androidx.compose.ui:ui-geometry-android:1.5.3
-|    |    |         |         +--- androidx.compose.ui:ui-util:1.5.3
-|    |    |         |         |    \--- androidx.compose.ui:ui-util-android:1.5.3
-|    |    |         |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    |         +--- androidx.compose.ui:ui-graphics:1.5.3
-|    |    |         |    \--- androidx.compose.ui:ui-graphics-android:1.5.3
-|    |    |         |         +--- androidx.compose.ui:ui-unit:1.5.3
-|    |    |         |         |    \--- androidx.compose.ui:ui-unit-android:1.5.3
-|    |    |         |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    |         +--- androidx.compose.ui:ui-text:1.5.3
-|    |    |         |    \--- androidx.compose.ui:ui-text-android:1.5.3
-|    |    |         |         +--- androidx.emoji2:emoji2:1.2.0 -> 1.4.0
-|    |    |         |         |    \--- androidx.lifecycle:lifecycle-process:2.4.1 -> 2.6.2
-|    |    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    |         +--- androidx.customview:customview-poolingcontainer:1.0.0
-|    |    |         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.9.20 (*)
-|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-|    +--- androidx.compose.animation:animation:1.5.1 -> 1.5.3
-|    |    \--- androidx.compose.animation:animation-android:1.5.3
-|    |         +--- androidx.compose.animation:animation-core:1.5.3
-|    |         |    \--- androidx.compose.animation:animation-core-android:1.5.3
-|    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
-|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |         +--- androidx.compose.foundation:foundation-layout:1.5.3
-|    |         |    \--- androidx.compose.foundation:foundation-layout-android:1.5.3
-|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
-|    +--- androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
-|    +--- androidx.navigation:navigation-runtime-ktx:2.7.6
-|    |    +--- androidx.navigation:navigation-common-ktx:2.7.6
-|    |    |    \--- androidx.navigation:navigation-common:2.7.6
-|    |    |         +--- androidx.collection:collection-ktx:1.1.0
-|    |    |         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.20 -> 1.9.20 (*)
-|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-|    |    \--- androidx.navigation:navigation-runtime:2.7.6
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
 +--- project :libs:analytics
 |    +--- com.automattic:Automattic-Tracks-Android:3.4.0
 |    |    \--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.11.0
 |    |         +--- com.squareup.okio:okio:3.2.0 -> 3.6.0
 |    |         |    \--- com.squareup.okio:okio-jvm:3.6.0
-|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10 -> 1.9.20 (*)
+|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10 -> 1.9.22 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.9.20 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.9.22 (*)
 |    \--- androidx.preference:preference:1.2.0
 |         +--- androidx.appcompat:appcompat:1.1.0 -> 1.6.1
 |         |    +--- androidx.fragment:fragment:1.3.6 -> 1.6.2
 |         |    |    +--- androidx.loader:loader:1.0.0
 |         |    |    |    \--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.6.2
-|         |    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
+|         |    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
-|         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.20 -> 1.9.20 (*)
+|         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.20 -> 1.9.22 (*)
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.9.20 (*)
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.9.22 (*)
 |         +--- androidx.fragment:fragment-ktx:1.3.6 -> 1.6.2
 |         |    +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1 -> 2.6.2
-|         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
+|         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.20 -> 1.9.20 (*)
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.20 -> 1.9.22 (*)
 |         \--- androidx.slidingpanelayout:slidingpanelayout:1.2.0
 |              \--- androidx.window:window:1.0.0
-|                   \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.9.20 (*)
+|                   \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.9.22 (*)
 +--- project :libs:image-editor
+|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
+|    +--- androidx.navigation:navigation-fragment:2.5.3 -> 2.7.6
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22
+|         +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
+|         \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.22
+|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 (*)
-|    +--- androidx.navigation:navigation-fragment:2.5.3 -> 2.7.6
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
-|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.10
-|         +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 -> 1.9.20 (*)
-|         \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.10
-|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 -> 1.9.20 (*)
 +--- project :libs:editor
+|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*)
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 (*)
 |    +--- org.wordpress.gutenberg-mobile:react-native-gutenberg-bridge:v1.112.0
 |    |    +--- org.wordpress.react-native-libraries.v4:react-native-safe-area-context:4.6.3
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.9.20 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.9.22 (*)
 |    |    +--- org.wordpress.react-native-libraries.v4:react-native-webview:11.26.1
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.20 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.22 (*)
 |    |    \--- org.wordpress.react-native-libraries.v4:react-native-gesture-handler:2.10.2
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.9.20 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.9.22 (*)
-|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.10 (*)
+|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 (*)
 +--- org.wordpress:fluxc:{strictly 2.67.0} -> 2.67.0
-|    +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20 -> 1.9.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20 -> 1.9.22 (*)
 |    +--- androidx.room:room-runtime:2.4.2 -> 2.5.0
 |    |    +--- androidx.sqlite:sqlite:2.3.0
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.20 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.22 (*)
 |    |    \--- androidx.sqlite:sqlite-framework:2.3.0
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.20 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.22 (*)
 |    \--- androidx.room:room-ktx:2.4.2
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.20 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.22 (*)
 +--- org.wordpress:login:1.14.0
 |    +--- androidx.credentials:credentials:1.2.0
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
 |    \--- androidx.credentials:credentials-play-services-auth:1.2.0
 |         +--- com.google.android.libraries.identity.googleid:googleid:1.1.0
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.0 -> 1.9.20 (*)
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.0 -> 1.9.22 (*)
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.20 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
 +--- com.automattic:about:1.4.0
-|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10 -> 1.9.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10 -> 1.9.22 (*)
 |    +--- androidx.compose.ui:ui-tooling:1.1.1 -> 1.5.3
 |    |    \--- androidx.compose.ui:ui-tooling-android:1.5.3
 |    |         +--- androidx.compose.material:material:1.0.0 -> 1.5.3
 |    |         |    \--- androidx.compose.material:material-android:1.5.3
 |    |         |         +--- androidx.compose.foundation:foundation:1.5.3
 |    |         |         |    \--- androidx.compose.foundation:foundation-android:1.5.3
-|    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
+|    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
 |    |         |         +--- androidx.compose.material:material-icons-core:1.5.3
 |    |         |         |    \--- androidx.compose.material:material-icons-core-android:1.5.3
-|    |         |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
+|    |         |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
-|    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
+|    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
 |    |         |         +--- androidx.compose.material:material-ripple:1.5.3
 |    |         |         |    \--- androidx.compose.material:material-ripple-android:1.5.3
-|    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
+|    |         |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
-|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
+|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
 |    |         +--- androidx.compose.ui:ui-tooling-data:1.5.3
 |    |         |    \--- androidx.compose.ui:ui-tooling-data-android:1.5.3
-|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
+|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
 |    |         +--- androidx.compose.ui:ui-tooling-preview:1.5.3
 |    |         |    \--- androidx.compose.ui:ui-tooling-preview-android:1.5.3
-|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
+|    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.20 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 -> 1.9.22 (*)
 |    \--- com.google.android.material:compose-theme-adapter:1.1.1
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.9.20 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.9.22 (*)
 +--- com.automattic:stories:2.4.0
-|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10 -> 1.9.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10 -> 1.9.22 (*)
 |    +--- org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc
 |    |    \--- org.jetbrains.kotlinx:kotlinx-serialization-runtime-jvm:1.0-M1-1.4.0-rc
-|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0-rc -> 1.9.20 (*)
+|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0-rc -> 1.9.22 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0-rc -> 1.9.20 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0-rc -> 1.9.22 (*)
 |    +--- org.jetbrains.kotlin:kotlin-reflect:1.6.10
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.20 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.9.22 (*)
 |    +--- com.automattic.stories:photoeditor:2.4.0
 |    |    \--- androidx.camera:camera-core:1.0.0-alpha06 -> 1.2.3
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.20 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.22 (*)
 |    \--- androidx.lifecycle:lifecycle-livedata-ktx:2.2.0 -> 2.6.2
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
 +--- com.google.android.flexbox:flexbox:3.0.0
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.32 -> 1.9.20 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.32 -> 1.9.22 (*)
 +--- androidx.work:work-runtime:2.8.1
 |    +--- androidx.lifecycle:lifecycle-service:2.1.0 -> 2.6.2
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.20 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.9.22 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21 -> 1.9.20 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21 -> 1.9.22 (*)
 +--- androidx.work:work-runtime-ktx:2.8.1
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21 -> 1.9.20 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21 -> 1.9.22 (*)
 +--- com.zendesk:support:5.1.2
 |    \--- com.zendesk:support-providers:5.1.2
 |         \--- com.zendesk:core:4.0.9
 |              \--- com.zendesk:java-common:2.0.0
-|                   \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.32 -> 1.9.20 (*)
+|                   \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.32 -> 1.9.22 (*)
 +--- com.google.dagger:hilt-android:2.50
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.20 -> 1.9.22 (*)
 +--- androidx.compose.runtime:runtime-livedata -> 1.5.3
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
 +--- io.coil-kt:coil-compose:2.4.0
 |    \--- io.coil-kt:coil-compose-base:2.4.0
 |         \--- io.coil-kt:coil-base:2.4.0
-|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.20 (*)
+|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21 -> 1.9.22 (*)
 +--- androidx.compose.material3:material3:1.1.1 -> 1.1.2
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20 -> 1.9.20 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20 -> 1.9.22 (*)
-\--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.10 (*)
+\--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 (*)

Please review and act accordingly

@wzieba wzieba marked this pull request as ready for review February 22, 2024 10:58
@wzieba wzieba requested review from a team and mkevins and removed request for a team February 22, 2024 10:58
Comment on lines 24 to 28
/**
* See: https://github.com/google/ksp/issues/797#issuecomment-1041127747
* Also: https://github.com/google/ksp/blob/a0cd7774a7f65cec45a50ecc8960ef5e4d47fc21/examples/playground/test-processor/src/main/kotlin/TestProcessor.kt#L20
*/
private var invoked = false
Copy link
Contributor Author

@wzieba wzieba Feb 22, 2024

Choose a reason for hiding this comment

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

In the case of this processor, we only one need round - generated files do not depend on each other or any other processors.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation. Minor suggestion: we could add your GitHub comment as a code comment (above the links to the discussion and example source), in case this assumption is later invalidated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! Added in 0292847

RemoteFeatureConfigDefaultsBuilder(defaults).getContent()
.writeTo(
codeGenerator,
aggregating = true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All output files are set to aggregating strategy for incremental processing. They have to, as we gather annotations from all available files in the codebase.

See https://kotlinlang.org/docs/ksp-incremental.html#aggregating-vs-isolating for more details.

Remove the, now not necessairy, feature in every test. It's unnecessary now as condition was updated in RemoteConfigProcessor
Copy link
Contributor

@mkevins mkevins left a comment

Choose a reason for hiding this comment

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

Thank you for migrating to KSP! The code changes look good, and I tested the scenarios described, and everything is working as expected. I did noticed, as you already mentioned that the generated outputs have a different order, but that should not affect anything.

I left one minor suggestion about adding more details to a code comment, in case multiple passes are required at some point in the future.

Comment on lines 24 to 28
/**
* See: https://github.com/google/ksp/issues/797#issuecomment-1041127747
* Also: https://github.com/google/ksp/blob/a0cd7774a7f65cec45a50ecc8960ef5e4d47fc21/examples/playground/test-processor/src/main/kotlin/TestProcessor.kt#L20
*/
private var invoked = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation. Minor suggestion: we could add your GitHub comment as a code comment (above the links to the discussion and example source), in case this assumption is later invalidated.

val result = compile(
listOf(
remoteFieldA,
featureA, /* adding a feature, as without it, annotation processor won't start */
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice that we are able to fix this 😄

@wzieba wzieba merged commit f44e5a6 into ksp Feb 23, 2024
@wzieba wzieba deleted the migrate_processors_to_ksp branch February 23, 2024 10:44
@wzieba wzieba mentioned this pull request Feb 23, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants