Skip to content

Commit

Permalink
Do not track API for generated code (#2354)
Browse files Browse the repository at this point in the history
We require the runtime libraries to use the exact same version as the code generator.
  • Loading branch information
JakeWharton authored Oct 2, 2024
1 parent 9f28c22 commit bd063c6
Show file tree
Hide file tree
Showing 20 changed files with 7 additions and 342 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ private class RedwoodBuildExtensionImpl(private val project: Project) : RedwoodB
klib.strictValidation = isCiEnvironment

nonPublicMarkers += listOf(
// Codegen-specific API only supports the exact same version as which did the generation.
"app.cash.redwood.RedwoodCodegenApi",
// The yoga module is an implementation detail of our layouts.
"app.cash.redwood.yoga.RedwoodYogaApi",
)
Expand Down
41 changes: 0 additions & 41 deletions redwood-compose/api/android/redwood-compose.api
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
public final class app/cash/redwood/compose/ActualsKt {
public static final fun redwoodApplier (Landroidx/compose/runtime/Composer;)Lapp/cash/redwood/compose/RedwoodApplier;
public static final fun widgetSystem (Lapp/cash/redwood/compose/RedwoodApplier;)Lapp/cash/redwood/widget/WidgetFactoryOwner;
}

public final class app/cash/redwood/compose/AndroidUiDispatcher : kotlinx/coroutines/CoroutineDispatcher {
public static final field $stable I
public static final field Companion Lapp/cash/redwood/compose/AndroidUiDispatcher$Companion;
Expand Down Expand Up @@ -31,32 +26,12 @@ public final class app/cash/redwood/compose/BackHandlerKt {
public static final fun getLocalOnBackPressedDispatcher ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public abstract interface class app/cash/redwood/compose/Node {
}

public abstract interface class app/cash/redwood/compose/RedwoodApplier {
public abstract fun getWidgetSystem ()Lapp/cash/redwood/widget/WidgetSystem;
public abstract fun recordChanged (Lapp/cash/redwood/widget/Widget;)V
}

public final class app/cash/redwood/compose/RedwoodComposeContent {
public static final field $stable I
public static final field Companion Lapp/cash/redwood/compose/RedwoodComposeContent$Companion;
public fun <init> ()V
public final fun Children (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
}

public final class app/cash/redwood/compose/RedwoodComposeContent$Companion {
public final fun getInstance ()Lapp/cash/redwood/compose/RedwoodComposeContent;
}

public abstract interface class app/cash/redwood/compose/RedwoodComposition {
public abstract fun cancel ()V
public abstract fun setContent (Lkotlin/jvm/functions/Function2;)V
}

public final class app/cash/redwood/compose/RedwoodCompositionKt {
public static final fun RedwoodComposeNode (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)V
public static final fun RedwoodComposition (Lkotlinx/coroutines/CoroutineScope;Lapp/cash/redwood/widget/RedwoodView;Lapp/cash/redwood/widget/WidgetSystem;Lkotlin/jvm/functions/Function0;)Lapp/cash/redwood/compose/RedwoodComposition;
public static final fun RedwoodComposition (Lkotlinx/coroutines/CoroutineScope;Lapp/cash/redwood/widget/Widget$Children;Lapp/cash/redwood/ui/OnBackPressedDispatcher;Landroidx/compose/runtime/saveable/SaveableStateRegistry;Lkotlinx/coroutines/flow/StateFlow;Lapp/cash/redwood/widget/WidgetSystem;Lkotlin/jvm/functions/Function0;)Lapp/cash/redwood/compose/RedwoodComposition;
public static synthetic fun RedwoodComposition$default (Lkotlinx/coroutines/CoroutineScope;Lapp/cash/redwood/widget/RedwoodView;Lapp/cash/redwood/widget/WidgetSystem;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lapp/cash/redwood/compose/RedwoodComposition;
Expand All @@ -68,22 +43,6 @@ public final class app/cash/redwood/compose/UiConfigurationKt {
public static final fun getLocalUiConfiguration ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public final class app/cash/redwood/compose/WidgetNode : app/cash/redwood/compose/Node {
public static final field $stable I
public static final field Companion Lapp/cash/redwood/compose/WidgetNode$Companion;
public fun <init> (Lapp/cash/redwood/compose/RedwoodApplier;Lapp/cash/redwood/widget/Widget;)V
public final fun getContainer ()Lapp/cash/redwood/widget/Widget$Children;
public final fun getIndex ()I
public final fun getWidget ()Lapp/cash/redwood/widget/Widget;
public final fun recordChanged ()V
public final fun setContainer (Lapp/cash/redwood/widget/Widget$Children;)V
public final fun setIndex (I)V
}

public final class app/cash/redwood/compose/WidgetNode$Companion {
public final fun getSetModifiers ()Lkotlin/jvm/functions/Function2;
}

public final class app/cash/redwood/compose/WidgetVersionKt {
public static final fun getLocalWidgetVersion ()Landroidx/compose/runtime/ProvidableCompositionLocal;
public static final fun getWidgetVersion (Landroidx/compose/runtime/Composer;I)I
Expand Down
41 changes: 0 additions & 41 deletions redwood-compose/api/jvm/redwood-compose.api
Original file line number Diff line number Diff line change
@@ -1,40 +1,15 @@
public final class app/cash/redwood/compose/ActualsKt {
public static final fun redwoodApplier (Landroidx/compose/runtime/Composer;)Lapp/cash/redwood/compose/RedwoodApplier;
public static final fun widgetSystem (Lapp/cash/redwood/compose/RedwoodApplier;)Lapp/cash/redwood/widget/WidgetFactoryOwner;
}

public final class app/cash/redwood/compose/BackHandlerKt {
public static final fun BackHandler (ZLkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)V
public static final fun getCurrent (Lapp/cash/redwood/ui/OnBackPressedDispatcher$Companion;Landroidx/compose/runtime/Composer;I)Lapp/cash/redwood/ui/OnBackPressedDispatcher;
public static final fun getLocalOnBackPressedDispatcher ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public abstract interface class app/cash/redwood/compose/Node {
}

public abstract interface class app/cash/redwood/compose/RedwoodApplier {
public abstract fun getWidgetSystem ()Lapp/cash/redwood/widget/WidgetSystem;
public abstract fun recordChanged (Lapp/cash/redwood/widget/Widget;)V
}

public final class app/cash/redwood/compose/RedwoodComposeContent {
public static final field $stable I
public static final field Companion Lapp/cash/redwood/compose/RedwoodComposeContent$Companion;
public fun <init> ()V
public final fun Children (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
}

public final class app/cash/redwood/compose/RedwoodComposeContent$Companion {
public final fun getInstance ()Lapp/cash/redwood/compose/RedwoodComposeContent;
}

public abstract interface class app/cash/redwood/compose/RedwoodComposition {
public abstract fun cancel ()V
public abstract fun setContent (Lkotlin/jvm/functions/Function2;)V
}

public final class app/cash/redwood/compose/RedwoodCompositionKt {
public static final fun RedwoodComposeNode (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)V
public static final fun RedwoodComposition (Lkotlinx/coroutines/CoroutineScope;Lapp/cash/redwood/widget/RedwoodView;Lapp/cash/redwood/widget/WidgetSystem;Lkotlin/jvm/functions/Function0;)Lapp/cash/redwood/compose/RedwoodComposition;
public static final fun RedwoodComposition (Lkotlinx/coroutines/CoroutineScope;Lapp/cash/redwood/widget/Widget$Children;Lapp/cash/redwood/ui/OnBackPressedDispatcher;Landroidx/compose/runtime/saveable/SaveableStateRegistry;Lkotlinx/coroutines/flow/StateFlow;Lapp/cash/redwood/widget/WidgetSystem;Lkotlin/jvm/functions/Function0;)Lapp/cash/redwood/compose/RedwoodComposition;
public static synthetic fun RedwoodComposition$default (Lkotlinx/coroutines/CoroutineScope;Lapp/cash/redwood/widget/RedwoodView;Lapp/cash/redwood/widget/WidgetSystem;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lapp/cash/redwood/compose/RedwoodComposition;
Expand All @@ -46,22 +21,6 @@ public final class app/cash/redwood/compose/UiConfigurationKt {
public static final fun getLocalUiConfiguration ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public final class app/cash/redwood/compose/WidgetNode : app/cash/redwood/compose/Node {
public static final field $stable I
public static final field Companion Lapp/cash/redwood/compose/WidgetNode$Companion;
public fun <init> (Lapp/cash/redwood/compose/RedwoodApplier;Lapp/cash/redwood/widget/Widget;)V
public final fun getContainer ()Lapp/cash/redwood/widget/Widget$Children;
public final fun getIndex ()I
public final fun getWidget ()Lapp/cash/redwood/widget/Widget;
public final fun recordChanged ()V
public final fun setContainer (Lapp/cash/redwood/widget/Widget$Children;)V
public final fun setIndex (I)V
}

public final class app/cash/redwood/compose/WidgetNode$Companion {
public final fun getSetModifiers ()Lkotlin/jvm/functions/Function2;
}

public final class app/cash/redwood/compose/WidgetVersionKt {
public static final fun getLocalWidgetVersion ()Landroidx/compose/runtime/ProvidableCompositionLocal;
public static final fun getWidgetVersion (Landroidx/compose/runtime/Composer;I)I
Expand Down
44 changes: 0 additions & 44 deletions redwood-compose/api/redwood-compose.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,11 @@
// - Show declarations: true

// Library unique name: <app.cash.redwood:redwood-compose>
abstract interface <#A: kotlin/Any> app.cash.redwood.compose/RedwoodApplier { // app.cash.redwood.compose/RedwoodApplier|null[0]
abstract val widgetSystem // app.cash.redwood.compose/RedwoodApplier.widgetSystem|{}widgetSystem[0]
abstract fun <get-widgetSystem>(): app.cash.redwood.widget/WidgetSystem<#A> // app.cash.redwood.compose/RedwoodApplier.widgetSystem.<get-widgetSystem>|<get-widgetSystem>(){}[0]

abstract fun recordChanged(app.cash.redwood.widget/Widget<#A>) // app.cash.redwood.compose/RedwoodApplier.recordChanged|recordChanged(app.cash.redwood.widget.Widget<1:0>){}[0]
}

abstract interface app.cash.redwood.compose/RedwoodComposition { // app.cash.redwood.compose/RedwoodComposition|null[0]
abstract fun cancel() // app.cash.redwood.compose/RedwoodComposition.cancel|cancel(){}[0]
abstract fun setContent(kotlin/Function2<androidx.compose.runtime/Composer, kotlin/Int, kotlin/Unit>) // app.cash.redwood.compose/RedwoodComposition.setContent|setContent(kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>){}[0]
}

sealed interface <#A: kotlin/Any> app.cash.redwood.compose/Node // app.cash.redwood.compose/Node|null[0]

final class <#A: out app.cash.redwood.widget/Widget<#B>, #B: kotlin/Any> app.cash.redwood.compose/WidgetNode : app.cash.redwood.compose/Node<#B> { // app.cash.redwood.compose/WidgetNode|null[0]
constructor <init>(app.cash.redwood.compose/RedwoodApplier<#B>, #A) // app.cash.redwood.compose/WidgetNode.<init>|<init>(app.cash.redwood.compose.RedwoodApplier<1:1>;1:0){}[0]

final val widget // app.cash.redwood.compose/WidgetNode.widget|{}widget[0]
final fun <get-widget>(): #A // app.cash.redwood.compose/WidgetNode.widget.<get-widget>|<get-widget>(){}[0]

final var container // app.cash.redwood.compose/WidgetNode.container|{}container[0]
final fun <get-container>(): app.cash.redwood.widget/Widget.Children<#B>? // app.cash.redwood.compose/WidgetNode.container.<get-container>|<get-container>(){}[0]
final fun <set-container>(app.cash.redwood.widget/Widget.Children<#B>?) // app.cash.redwood.compose/WidgetNode.container.<set-container>|<set-container>(app.cash.redwood.widget.Widget.Children<1:1>?){}[0]
final var index // app.cash.redwood.compose/WidgetNode.index|{}index[0]
final fun <get-index>(): kotlin/Int // app.cash.redwood.compose/WidgetNode.index.<get-index>|<get-index>(){}[0]
final fun <set-index>(kotlin/Int) // app.cash.redwood.compose/WidgetNode.index.<set-index>|<set-index>(kotlin.Int){}[0]

final fun recordChanged() // app.cash.redwood.compose/WidgetNode.recordChanged|recordChanged(){}[0]

final object Companion { // app.cash.redwood.compose/WidgetNode.Companion|null[0]
final val SetModifiers // app.cash.redwood.compose/WidgetNode.Companion.SetModifiers|{}SetModifiers[0]
final fun <get-SetModifiers>(): kotlin/Function2<app.cash.redwood.compose/WidgetNode<app.cash.redwood.widget/Widget<kotlin/Any>, kotlin/Any>, app.cash.redwood/Modifier, kotlin/Unit> // app.cash.redwood.compose/WidgetNode.Companion.SetModifiers.<get-SetModifiers>|<get-SetModifiers>(){}[0]
}
}

final class <#A: out app.cash.redwood.widget/Widget<*>> app.cash.redwood.compose/RedwoodComposeContent { // app.cash.redwood.compose/RedwoodComposeContent|null[0]
constructor <init>() // app.cash.redwood.compose/RedwoodComposeContent.<init>|<init>(){}[0]

final fun Children(kotlin/Function1<#A, app.cash.redwood.widget/Widget.Children<*>>, kotlin/Function2<androidx.compose.runtime/Composer, kotlin/Int, kotlin/Unit>, androidx.compose.runtime/Composer?, kotlin/Int) // app.cash.redwood.compose/RedwoodComposeContent.Children|Children(kotlin.Function1<1:0,app.cash.redwood.widget.Widget.Children<*>>;kotlin.Function2<androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){}[0]

final object Companion { // app.cash.redwood.compose/RedwoodComposeContent.Companion|null[0]
final val Instance // app.cash.redwood.compose/RedwoodComposeContent.Companion.Instance|{}Instance[0]
final fun <get-Instance>(): app.cash.redwood.compose/RedwoodComposeContent<kotlin/Nothing> // app.cash.redwood.compose/RedwoodComposeContent.Companion.Instance.<get-Instance>|<get-Instance>(){}[0]
}
}

final val app.cash.redwood.compose/LocalOnBackPressedDispatcher // app.cash.redwood.compose/LocalOnBackPressedDispatcher|{}LocalOnBackPressedDispatcher[0]
final fun <get-LocalOnBackPressedDispatcher>(): androidx.compose.runtime/ProvidableCompositionLocal<app.cash.redwood.ui/OnBackPressedDispatcher> // app.cash.redwood.compose/LocalOnBackPressedDispatcher.<get-LocalOnBackPressedDispatcher>|<get-LocalOnBackPressedDispatcher>(){}[0]
final val app.cash.redwood.compose/LocalUiConfiguration // app.cash.redwood.compose/LocalUiConfiguration|{}LocalUiConfiguration[0]
Expand All @@ -77,9 +36,6 @@ final fun app.cash.redwood.compose/app_cash_redwood_compose_ChildrenNode$stablep
final fun app.cash.redwood.compose/app_cash_redwood_compose_NodeApplier$stableprop_getter(): kotlin/Int // app.cash.redwood.compose/app_cash_redwood_compose_NodeApplier$stableprop_getter|app_cash_redwood_compose_NodeApplier$stableprop_getter(){}[0]
final fun app.cash.redwood.compose/app_cash_redwood_compose_RedwoodComposeContent$stableprop_getter(): kotlin/Int // app.cash.redwood.compose/app_cash_redwood_compose_RedwoodComposeContent$stableprop_getter|app_cash_redwood_compose_RedwoodComposeContent$stableprop_getter(){}[0]
final fun app.cash.redwood.compose/app_cash_redwood_compose_WidgetNode$stableprop_getter(): kotlin/Int // app.cash.redwood.compose/app_cash_redwood_compose_WidgetNode$stableprop_getter|app_cash_redwood_compose_WidgetNode$stableprop_getter(){}[0]
final inline fun <#A: app.cash.redwood.widget/WidgetFactoryOwner<#B>, #B: kotlin/Any> (app.cash.redwood.compose/RedwoodApplier<#B>).app.cash.redwood.compose/widgetSystem(): #A // app.cash.redwood.compose/widgetSystem|[email protected]<0:1>(){0§<app.cash.redwood.widget.WidgetFactoryOwner<0:1>>;1§<kotlin.Any>}[0]
final inline fun <#A: app.cash.redwood.widget/WidgetFactoryOwner<#C>, #B: app.cash.redwood.widget/Widget<#C>, #C: kotlin/Any> app.cash.redwood.compose/RedwoodComposeNode(crossinline kotlin/Function1<#A, #B>, kotlin/Function1<androidx.compose.runtime/Updater<app.cash.redwood.compose/WidgetNode<#B, #C>>, kotlin/Unit>, kotlin/Function3<app.cash.redwood.compose/RedwoodComposeContent<#B>, androidx.compose.runtime/Composer, kotlin/Int, kotlin/Unit>, androidx.compose.runtime/Composer?, kotlin/Int) // app.cash.redwood.compose/RedwoodComposeNode|RedwoodComposeNode(kotlin.Function1<0:0,0:1>;kotlin.Function1<androidx.compose.runtime.Updater<app.cash.redwood.compose.WidgetNode<0:1,0:2>>,kotlin.Unit>;kotlin.Function3<app.cash.redwood.compose.RedwoodComposeContent<0:1>,androidx.compose.runtime.Composer,kotlin.Int,kotlin.Unit>;androidx.compose.runtime.Composer?;kotlin.Int){0§<app.cash.redwood.widget.WidgetFactoryOwner<0:2>>;1§<app.cash.redwood.widget.Widget<0:2>>;2§<kotlin.Any>}[0]
final inline fun <#A: kotlin/Any> (androidx.compose.runtime/Composer).app.cash.redwood.compose/redwoodApplier(): app.cash.redwood.compose/RedwoodApplier<#A> // app.cash.redwood.compose/redwoodApplier|[email protected](){0§<kotlin.Any>}[0]

// Targets: [ios]
final object app.cash.redwood.compose/DisplayLinkClock : androidx.compose.runtime/MonotonicFrameClock { // app.cash.redwood.compose/DisplayLinkClock|null[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ public class RedwoodComposeContent<out W : Widget<*>> {
)
}

@RedwoodCodegenApi // https://github.com/Kotlin/binary-compatibility-validator/issues/91
public companion object {
public val Instance: RedwoodComposeContent<Nothing> = RedwoodComposeContent()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public class WidgetNode<out W : Widget<V>, V : Any>(
/** The index of [widget] within its parent [container] when attached. */
public var index: Int = -1

@RedwoodCodegenApi // https://github.com/Kotlin/binary-compatibility-validator/issues/91
public companion object {
public val SetModifiers: WidgetNode<Widget<Any>, Any>.(Modifier) -> Unit = {
recordChanged()
Expand Down
9 changes: 0 additions & 9 deletions redwood-layout-widget/api/redwood-layout-widget.api
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ public abstract interface class app/cash/redwood/layout/widget/RedwoodLayoutWidg
public abstract fun Spacer ()Lapp/cash/redwood/layout/widget/Spacer;
}

public abstract interface class app/cash/redwood/layout/widget/RedwoodLayoutWidgetFactoryOwner : app/cash/redwood/widget/WidgetFactoryOwner {
public static final field Companion Lapp/cash/redwood/layout/widget/RedwoodLayoutWidgetFactoryOwner$Companion;
public abstract fun getRedwoodLayout ()Lapp/cash/redwood/layout/widget/RedwoodLayoutWidgetFactory;
}

public final class app/cash/redwood/layout/widget/RedwoodLayoutWidgetFactoryOwner$Companion {
public final fun apply (Lapp/cash/redwood/layout/widget/RedwoodLayoutWidgetFactory;Ljava/lang/Object;Lapp/cash/redwood/Modifier$UnscopedElement;)V
}

public final class app/cash/redwood/layout/widget/RedwoodLayoutWidgetSystem : app/cash/redwood/layout/widget/RedwoodLayoutWidgetFactoryOwner, app/cash/redwood/widget/WidgetSystem {
public static final field Companion Lapp/cash/redwood/layout/widget/RedwoodLayoutWidgetSystem$Companion;
public fun <init> (Lapp/cash/redwood/layout/widget/RedwoodLayoutWidgetFactory;)V
Expand Down
9 changes: 0 additions & 9 deletions redwood-layout-widget/api/redwood-layout-widget.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ abstract interface <#A: kotlin/Any> app.cash.redwood.layout.widget/RedwoodLayout
abstract fun Spacer(): app.cash.redwood.layout.widget/Spacer<#A> // app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactory.Spacer|Spacer(){}[0]
}

abstract interface <#A: kotlin/Any> app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactoryOwner : app.cash.redwood.widget/WidgetFactoryOwner<#A> { // app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactoryOwner|null[0]
abstract val RedwoodLayout // app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactoryOwner.RedwoodLayout|{}RedwoodLayout[0]
abstract fun <get-RedwoodLayout>(): app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactory<#A> // app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactoryOwner.RedwoodLayout.<get-RedwoodLayout>|<get-RedwoodLayout>(){}[0]

final object Companion { // app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactoryOwner.Companion|null[0]
final fun <#A2: kotlin/Any> apply(app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactory<#A2>, #A2, app.cash.redwood/Modifier.UnscopedElement) // app.cash.redwood.layout.widget/RedwoodLayoutWidgetFactoryOwner.Companion.apply|apply(app.cash.redwood.layout.widget.RedwoodLayoutWidgetFactory<0:0>;0:0;app.cash.redwood.Modifier.UnscopedElement){0§<kotlin.Any>}[0]
}
}

abstract interface <#A: kotlin/Any> app.cash.redwood.layout.widget/Row : app.cash.redwood.widget/Widget<#A> { // app.cash.redwood.layout.widget/Row|null[0]
abstract val children // app.cash.redwood.layout.widget/Row.children|{}children[0]
abstract fun <get-children>(): app.cash.redwood.widget/Widget.Children<#A> // app.cash.redwood.layout.widget/Row.children.<get-children>|<get-children>(){}[0]
Expand Down
Loading

0 comments on commit bd063c6

Please sign in to comment.