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

Removed deprecated code with ERROR level, incresased deprecation levels from WARNING to ERROR #64

Merged
merged 1 commit into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions decompose/api/android/decompose.api
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ public final class com/arkivanov/decompose/Child$Destroyed : com/arkivanov/decom
}

public abstract interface class com/arkivanov/decompose/ComponentContext : com/arkivanov/essenty/backpressed/BackPressedHandlerOwner, com/arkivanov/essenty/instancekeeper/InstanceKeeperOwner, com/arkivanov/essenty/lifecycle/LifecycleOwner, com/arkivanov/essenty/statekeeper/StateKeeperOwner {
public abstract fun getBackPressedDispatcher ()Lcom/arkivanov/essenty/backpressed/BackPressedDispatcher;
}

public final class com/arkivanov/decompose/ComponentContextExtKt {
public static final fun child (Lcom/arkivanov/decompose/ComponentContext;Ljava/lang/String;)Lcom/arkivanov/decompose/ComponentContext;
public static final fun childContext (Lcom/arkivanov/decompose/ComponentContext;Ljava/lang/String;Lcom/arkivanov/essenty/lifecycle/Lifecycle;)Lcom/arkivanov/decompose/ComponentContext;
public static synthetic fun childContext$default (Lcom/arkivanov/decompose/ComponentContext;Ljava/lang/String;Lcom/arkivanov/essenty/lifecycle/Lifecycle;ILjava/lang/Object;)Lcom/arkivanov/decompose/ComponentContext;
}
Expand All @@ -47,7 +45,6 @@ public final class com/arkivanov/decompose/DefaultComponentContext : com/arkivan
public fun <init> (Lcom/arkivanov/essenty/lifecycle/Lifecycle;)V
public fun <init> (Lcom/arkivanov/essenty/lifecycle/Lifecycle;Lcom/arkivanov/essenty/statekeeper/StateKeeper;Lcom/arkivanov/essenty/instancekeeper/InstanceKeeper;Lcom/arkivanov/essenty/backpressed/BackPressedHandler;)V
public synthetic fun <init> (Lcom/arkivanov/essenty/lifecycle/Lifecycle;Lcom/arkivanov/essenty/statekeeper/StateKeeper;Lcom/arkivanov/essenty/instancekeeper/InstanceKeeper;Lcom/arkivanov/essenty/backpressed/BackPressedHandler;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun getBackPressedDispatcher ()Lcom/arkivanov/essenty/backpressed/BackPressedDispatcher;
public fun getBackPressedHandler ()Lcom/arkivanov/essenty/backpressed/BackPressedHandler;
public fun getInstanceKeeper ()Lcom/arkivanov/essenty/instancekeeper/InstanceKeeper;
public fun getLifecycle ()Lcom/arkivanov/essenty/lifecycle/Lifecycle;
Expand Down
3 changes: 0 additions & 3 deletions decompose/api/jvm/decompose.api
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ public final class com/arkivanov/decompose/Child$Destroyed : com/arkivanov/decom
}

public abstract interface class com/arkivanov/decompose/ComponentContext : com/arkivanov/essenty/backpressed/BackPressedHandlerOwner, com/arkivanov/essenty/instancekeeper/InstanceKeeperOwner, com/arkivanov/essenty/lifecycle/LifecycleOwner, com/arkivanov/essenty/statekeeper/StateKeeperOwner {
public abstract fun getBackPressedDispatcher ()Lcom/arkivanov/essenty/backpressed/BackPressedDispatcher;
}

public final class com/arkivanov/decompose/ComponentContextExtKt {
public static final fun child (Lcom/arkivanov/decompose/ComponentContext;Ljava/lang/String;)Lcom/arkivanov/decompose/ComponentContext;
public static final fun childContext (Lcom/arkivanov/decompose/ComponentContext;Ljava/lang/String;Lcom/arkivanov/essenty/lifecycle/Lifecycle;)Lcom/arkivanov/decompose/ComponentContext;
public static synthetic fun childContext$default (Lcom/arkivanov/decompose/ComponentContext;Ljava/lang/String;Lcom/arkivanov/essenty/lifecycle/Lifecycle;ILjava/lang/Object;)Lcom/arkivanov/decompose/ComponentContext;
}
Expand All @@ -40,7 +38,6 @@ public final class com/arkivanov/decompose/DefaultComponentContext : com/arkivan
public fun <init> (Lcom/arkivanov/essenty/lifecycle/Lifecycle;)V
public fun <init> (Lcom/arkivanov/essenty/lifecycle/Lifecycle;Lcom/arkivanov/essenty/statekeeper/StateKeeper;Lcom/arkivanov/essenty/instancekeeper/InstanceKeeper;Lcom/arkivanov/essenty/backpressed/BackPressedHandler;)V
public synthetic fun <init> (Lcom/arkivanov/essenty/lifecycle/Lifecycle;Lcom/arkivanov/essenty/statekeeper/StateKeeper;Lcom/arkivanov/essenty/instancekeeper/InstanceKeeper;Lcom/arkivanov/essenty/backpressed/BackPressedHandler;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun getBackPressedDispatcher ()Lcom/arkivanov/essenty/backpressed/BackPressedDispatcher;
public fun getBackPressedHandler ()Lcom/arkivanov/essenty/backpressed/BackPressedHandler;
public fun getInstanceKeeper ()Lcom/arkivanov/essenty/instancekeeper/InstanceKeeper;
public fun getLifecycle ()Lcom/arkivanov/essenty/lifecycle/Lifecycle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.arkivanov.decompose

import com.arkivanov.essenty.backpressed.BackPressedDispatcher
import com.arkivanov.essenty.backpressed.BackPressedHandlerOwner
import com.arkivanov.essenty.instancekeeper.InstanceKeeperOwner
import com.arkivanov.essenty.lifecycle.LifecycleOwner
Expand All @@ -10,13 +9,4 @@ interface ComponentContext :
LifecycleOwner,
StateKeeperOwner,
InstanceKeeperOwner,
BackPressedHandlerOwner {

@Deprecated(
message = "ComponentContext now extends BackPressedHandlerOwner instead of BackPressedDispatcherOwner. " +
"Please use backPressedHandler property.",
replaceWith = ReplaceWith("backPressedHandler"),
level = DeprecationLevel.ERROR,
)
val backPressedDispatcher: BackPressedDispatcher
}
BackPressedHandlerOwner
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,3 @@ fun ComponentContext.childContext(key: String, lifecycle: Lifecycle? = null): Co
instanceKeeper = instanceKeeper.child(key, lifecycle),
backPressedHandler = backPressedHandler.child(lifecycle),
)

@Deprecated(
message = "Use childContext(key)",
replaceWith = ReplaceWith("childContext(key)"),
level = DeprecationLevel.ERROR,
)
fun ComponentContext.child(key: String): ComponentContext = childContext(key = key)
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ class DefaultComponentContext(
override val instanceKeeper: InstanceKeeper = instanceKeeper ?: InstanceKeeperDispatcher().attachTo(lifecycle)
override val backPressedHandler: BackPressedHandler = backPressedHandler ?: BackPressedDispatcher()

override val backPressedDispatcher: BackPressedDispatcher by lazy {
BackPressedDispatcher().also { dispatcher ->
this.backPressedHandler.register(dispatcher::onBackPressed)
}
}

constructor(lifecycle: Lifecycle) : this(
lifecycle = lifecycle,
stateKeeper = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ inline fun <reified C : Parcelable, T : Any> ComponentContext.router(
* A convenience extension function for [ComponentContext.router].
*/
@Suppress("DeprecatedCallableAddReplaceWith")
@Deprecated(message = "Please use ComponentContext.router extension function with initialStack argument")
@Deprecated(
message = "Please use ComponentContext.router extension function with initialStack argument",
level = DeprecationLevel.ERROR,
)
fun <C : Parcelable, T : Any> ComponentContext.router(
initialConfiguration: () -> C,
initialBackStack: () -> List<C> = ::emptyList,
Expand All @@ -103,8 +106,11 @@ fun <C : Parcelable, T : Any> ComponentContext.router(
/**
* A convenience extension function for [ComponentContext.router].
*/
@Suppress("DeprecatedCallableAddReplaceWith")
@Deprecated(message = "Please use ComponentContext.router extension function with initialStack argument")
@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION_ERROR")
@Deprecated(
message = "Please use ComponentContext.router extension function with initialStack argument",
level = DeprecationLevel.ERROR,
)
inline fun <reified C : Parcelable, T : Any> ComponentContext.router(
initialConfiguration: C,
initialBackStack: List<C> = emptyList(),
Expand All @@ -124,8 +130,11 @@ inline fun <reified C : Parcelable, T : Any> ComponentContext.router(
/**
* A convenience extension function for [ComponentContext.router].
*/
@Suppress("DeprecatedCallableAddReplaceWith")
@Deprecated(message = "Please use ComponentContext.router extension function with initialStack argument")
@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION_ERROR")
@Deprecated(
message = "Please use ComponentContext.router extension function with initialStack argument",
level = DeprecationLevel.ERROR,
)
inline fun <reified C : Parcelable, T : Any> ComponentContext.router(
noinline initialConfiguration: () -> C,
noinline initialBackStack: () -> List<C> = ::emptyList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,5 @@ class ChildContextTest {
override val lifecycle: LifecycleRegistry = LifecycleRegistry()
override val stateKeeper: TestStateKeeperDispatcher = TestStateKeeperDispatcher(savedState)
override val backPressedHandler: BackPressedDispatcher = BackPressedDispatcher()

override val backPressedDispatcher: BackPressedDispatcher get() = TODO("Not yet implemented")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,10 @@ public final class com/arkivanov/decompose/extensions/compose/jetbrains/Children
public static final fun Children (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/ui/Modifier;Lcom/arkivanov/decompose/extensions/compose/jetbrains/animation/child/ChildAnimation;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
}

public final class com/arkivanov/decompose/extensions/compose/jetbrains/RootComponentBuilderKt {
public static final fun rememberRootComponent (Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/ViewModelStore;Landroidx/activity/OnBackPressedDispatcher;Landroidx/lifecycle/Lifecycle;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Ljava/lang/Object;
public static final fun rememberRootComponent (Landroidx/savedstate/SavedStateRegistryOwner;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
}

public final class com/arkivanov/decompose/extensions/compose/jetbrains/SubscribeAsStateKt {
public static final fun subscribeAsState (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
}

public final class com/arkivanov/decompose/extensions/compose/jetbrains/ValueComposableKt {
public static final fun asState (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
}

public abstract interface class com/arkivanov/decompose/extensions/compose/jetbrains/animation/child/ChildAnimation {
public abstract fun invoke (Lcom/arkivanov/decompose/router/RouterState;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)V
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ public final class com/arkivanov/decompose/extensions/compose/jetbrains/Children
public static final fun Children (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/ui/Modifier;Lcom/arkivanov/decompose/extensions/compose/jetbrains/animation/child/ChildAnimation;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
}

public final class com/arkivanov/decompose/extensions/compose/jetbrains/RootComponentBuilderKt {
public static final fun rememberRootComponent (Lcom/arkivanov/essenty/lifecycle/Lifecycle;Lcom/arkivanov/essenty/statekeeper/StateKeeper;Lcom/arkivanov/essenty/instancekeeper/InstanceKeeper;Lcom/arkivanov/essenty/backpressed/BackPressedDispatcher;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Ljava/lang/Object;
}

public final class com/arkivanov/decompose/extensions/compose/jetbrains/SubscribeAsStateKt {
public static final fun subscribeAsState (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
}

public final class com/arkivanov/decompose/extensions/compose/jetbrains/ValueComposableKt {
public static final fun asState (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
}

public abstract interface class com/arkivanov/decompose/extensions/compose/jetbrains/animation/child/ChildAnimation {
public abstract fun invoke (Lcom/arkivanov/decompose/router/RouterState;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)V
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions extensions-compose-jetpack/api/extensions-compose-jetpack.api
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,10 @@ public final class com/arkivanov/decompose/extensions/compose/jetpack/ChildrenKt
public static final fun Children (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/ui/Modifier;Lcom/arkivanov/decompose/extensions/compose/jetpack/animation/child/ChildAnimation;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
}

public final class com/arkivanov/decompose/extensions/compose/jetpack/RootComponentBuilderKt {
public static final fun rememberRootComponent (Landroidx/savedstate/SavedStateRegistry;Landroidx/lifecycle/ViewModelStore;Landroidx/activity/OnBackPressedDispatcher;Landroidx/lifecycle/Lifecycle;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Ljava/lang/Object;
public static final fun rememberRootComponent (Landroidx/savedstate/SavedStateRegistryOwner;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
}

public final class com/arkivanov/decompose/extensions/compose/jetpack/SubscribeAsStateKt {
public static final fun subscribeAsState (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
}

public final class com/arkivanov/decompose/extensions/compose/jetpack/ValueComposableKt {
public static final fun asState (Lcom/arkivanov/decompose/value/Value;Landroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
}

public abstract interface class com/arkivanov/decompose/extensions/compose/jetpack/animation/child/ChildAnimation {
public abstract fun invoke (Lcom/arkivanov/decompose/router/RouterState;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)V
}
Expand Down
Loading