bug in DiffRenderContext
See original GitHub issueIt is triggered by user code, but I think the bug in how diff is rendered.
If I use access.transition
the failure is silent. access.syncTransition
makes the issue clear.
[info] scala.MatchError: 3 (of class java.lang.Byte)
[info] at levsha.impl.DiffRenderContext.deleteLoop(DiffRenderContext.scala:408)
[info] at levsha.impl.DiffRenderContext.diff(DiffRenderContext.scala:242)
[info] at korolev.internal.ApplicationInstance.$anonfun$onState$8(ApplicationInstance.scala:119)
[info] at korolev.internal.ApplicationInstance.$anonfun$onState$8$adapted(ApplicationInstance.scala:119)
[info] at korolev.internal.Frontend.$anonfun$performDomChanges$1(Frontend.scala:189)
[info] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[info] at korolev.effect.Effect$FutureEffect.delay(Effect.scala:78)
[info] at korolev.effect.Effect$FutureEffect.delay(Effect.scala:66)
[info] at korolev.internal.Frontend.performDomChanges(Frontend.scala:187)
[info] at korolev.internal.ApplicationInstance.$anonfun$onState$7(ApplicationInstance.scala:119)
[info] at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info] at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info] at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info] at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info] at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info] at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info] at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info] at korolev.internal.ApplicationInstance.$anonfun$onState$5(ApplicationInstance.scala:108)
[info] at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info] at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info] at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info] at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info] at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info] at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info] at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info] at korolev.internal.ApplicationInstance.$anonfun$onState$1(ApplicationInstance.scala:105)
[info] at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info] at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info] at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info] at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info] at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info] at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info] at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info] at korolev.internal.ApplicationInstance.onState(ApplicationInstance.scala:103)
[info] at korolev.internal.ApplicationInstance.$anonfun$topLevelComponentInstance$2(ApplicationInstance.scala:84)
[info] at korolev.internal.ComponentInstance.$anonfun$applyTransition$4(ComponentInstance.scala:280)
[info] at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info] at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info] at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info] at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info] at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info] at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info] at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info] at korolev.internal.ComponentInstance.$anonfun$applyTransition$2(ComponentInstance.scala:279)
[info] at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info] at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info] at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info] at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info] at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info] at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info] at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info] at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info] at korolev.internal.ComponentInstance.$anonfun$applyTransition$1(ComponentInstance.scala:277)
[info] at korolev.internal.ComponentInstance.applyTransition(ComponentInstance.scala:282)
[info] at korolev.internal.ComponentInstance$browserAccess$.syncTransition(ComponentInstance.scala:140)
[info] at com.nt.front.UiWebService.$anonfun$config$433(UiWebService.scala:2793)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
fomkin/korolev - Gitter
I think there is a bug somewhere. ... as I said, i think this is a bug in optimizer. ... <init>(DiffRenderContext.scala:65) [error] at...
Read more >[visualization] possible bug: in visualizer, point clouds' positions are ...
Describe the bug. In visualizer, point clouds' positions are not correct. Context. Just trying to show two point clouds in pcl visualizer, ...
Read more >fomkin ( Aleksey Fomkin ) - github record :)
I assume they are bugs. I've constructed minimal examples for both ... openNode(DiffRenderContext.scala:101) [info] at korolev.server.internal.services.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem was partially fixed in Levsha 1.0.0. Now if tag content couldn’t be sorted during optimization it will be leaved unoptimized. However you can force optimization for these cases if you want. See optimizer options.
It’s known problem. If
levsha.macros.unableToSortTagWarnings
sys property is true, you will get warning about this. Unfortunately I never added it to documentation. Try:Also you can use
when
as shortcut forif (cond) node else void
.