Cleanup.#513
Conversation
There was a problem hiding this comment.
formula-android/src/main/java/com/instacart/formula/android/RouteId.kt:24
Removing these deprecated Fragment* compatibility aliases and Fragment.getFormulaFragmentId() changes the published formula-android API surface in a breaking way. In particular, deleting getFormulaFragmentId() removes a JVM method that already-compiled consumers can still call, which can turn into NoSuchMethodError until they recompile. The alias removals in this cleanup are also source-breaking for Kotlin callers. If this is intended, it should land as part of the coordinated breaking-release/versioning/docs work; otherwise the deprecated forwarding API should stay in place for now.
JaCoCo Code Coverage 93.83% ✅
Generated by 🚫 Danger |
📊 Benchmark Comparison ReportSummary
🎉 Performance Improvements
No significant changes (3 benchmarks)
Regressions: ±10% with non-overlapping confidence intervals. Improvements: ±10% change only. Generated by 🚫 Danger |
| } | ||
|
|
||
| private val formulaRouteId: RouteId<*> by lazy { | ||
| private val formulaRouteId: RouteId<*> by lazy(LazyThreadSafetyMode.NONE) { |
There was a problem hiding this comment.
This is only internally used from main thread?
There was a problem hiding this comment.
Correct:
- 1st call in
onCreateViewis guaranteed main thread - 2nd call in
onCreateView(withinsetContentrecomposition) may potentially be non-main, butformulaRouteIdshould always be already initialized at that point (by the 1st call) setState->updateVisibleFragments()->onFragmentViewCreated()- guaranteed main threadsetState->updateVisibleFragments()->render()- guaranteed main thread due to priorUtils.assertMainThread()
No description provided.