-
-
Notifications
You must be signed in to change notification settings - Fork 98
Added DecomposeSettings#onDecomposeError setting, deprecated onDecomposeError callback #965
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
Conversation
WalkthroughAdds a new onDecomposeError callback property to DecomposeSettings (with default ::printError), updates its constructor/copy/component signatures across platform APIs, and deprecates the legacy top-level onDecomposeError in favor of the settings-based property that delegates to DecomposeSettings. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-11-09T18:14:31.048ZApplied to files:
📚 Learning: 2025-05-28T22:32:21.630ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
decompose/src/commonMain/kotlin/com/arkivanov/decompose/errorhandler/ErrorHandlers.kt (1)
8-13: Consider addingreplaceWith = ReplaceWith(...)to the deprecation to ease migration.
Right now it’s message-only; aReplaceWith("DecomposeSettings.settings = DecomposeSettings.settings.copy(onDecomposeError = value)")(or whatever preferred) would make IDE refactors smoother.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
decompose/api/android/decompose.api(1 hunks)decompose/api/decompose.klib.api(1 hunks)decompose/api/jvm/decompose.api(1 hunks)decompose/src/commonMain/kotlin/com/arkivanov/decompose/DecomposeSettings.kt(2 hunks)decompose/src/commonMain/kotlin/com/arkivanov/decompose/errorhandler/ErrorHandlers.kt(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build on macOS
- GitHub Check: Build on Linux
🔇 Additional comments (4)
decompose/src/commonMain/kotlin/com/arkivanov/decompose/DecomposeSettings.kt (1)
14-20: Nice defaulting ofonDecomposeErrorto::printError.
KDoc + sensible default makes the new hook easy to adopt without behavior changes for existing users.decompose/api/android/decompose.api (1)
74-85: API dump updates look consistent with the newonDecomposeErrorproperty.
Please double-check these are produced by the project’s API/ABI tooling (not hand-edited) and that downstream compatibility expectations are met.decompose/api/decompose.klib.api (1)
486-498: KLib ABI dump changes are consistent with addingonDecomposeError, but this is an ABI change for KMP consumers.
Please confirm the project’s compatibility/versioning expectations for KLib consumers are satisfied.decompose/api/jvm/decompose.api (1)
74-85: JVM API dump changes look correct; verify JVM binary-compat expectations.
If you aim to support already-compiled clients, consider restoring a(Boolean, Boolean)overload (e.g., secondary ctor) or clearly treating this as a breaking change in the release/versioning.
decompose/src/commonMain/kotlin/com/arkivanov/decompose/DecomposeSettings.kt
Show resolved
Hide resolved
3343f53 to
da40668
Compare
Summary by CodeRabbit
New Features
Deprecations
✏️ Tip: You can customize this high-level summary in your review settings.