Closed warmrobot closed 4 years ago
Thanks for the report!
This is a strange one indeed because it requires all four of these conditions:
a0
in this instancearr
and altered variable (a0
) in a conditionalout:
transition somewhere in the {#if}
or {:else}
blockIt boils down to missing show_if === null
in the conditional for selecting the if/else
block.
As for your observation of dirty array, no it is a bitmask array representing 30 items per block (-1 is special reserved value). In this case, you have exactly 30 variables so it fits in a single value.
I spend a day to debug it. And I will try to simplify the example (I am sure it is possible). Right now I supposed that compiler must send [-1], instead of -1 in "context_overflow mode" )
context_overflow in the right
@warmrobot,
Very curious, I don't see the use of dirty[0]
when it fails.
https://svelte.dev/repl/a895c06b0bdf4bceaeb1af406263b2b1?version=3.17.0
Your failing example will work good for debugging the compiler, I just removed some of the extra text so that it is easier to put into a failing test.
I add a failing test of hydration in forked https://github.com/warmrobot/svelte Still investigating in https://github.com/warmrobot/masks
I have just hit this error as well, I have one case which is always going to be false:
And I have the case as already mentioned in above comments where it thinks dirty
is an array even though it isn't:
Has there been any progress on this regression, or will we just have to pin to 3.15.0
for the foreseeable future?
@AlexKornitzer it'll be helpful if you could provide us a repro in the https://svelte.dev/repl
Let me see if I can get it in the REPL, was struggling to do that earlier due the amount of complexity required to reproduce it and it seemed like the OP had identified the issue. In my code the ctx index is going above 30. Anyway let me see if I can abstract my table component into the REPL.
@tanhauhau so I used the original example to bump the context over 30, removed a lot of the table fluff as well cause I guess at the end of the day its the same issue as above. I doubt I'll be able to hit the 0
dirty issue without knowing exactly how the bitmasker works. Anyway so we have the broken example (you will see that pagination works but the tbody will not update):
https://svelte.dev/repl/908720c4e7404cb193075b294604e333?version=3.19.1
If we then pin to 3.15.0
all is working:
https://svelte.dev/repl/908720c4e7404cb193075b294604e333?version=3.15.0
Thanks. Let me look into it
Rapid, thanks guys, can confirm all is working now :D
Cheers
Thank you so much!
Describe the bug
if
directive doesn't work as expected if context_overflow (this.context.length > 31)To Reproduce https://svelte.dev/repl/09bca24d4cc940e38b00afe53ad3da51?version=3.17.0
Expected behavior You should see
true
two timesInformation about your Svelte project:
Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10) FF, Chrome
Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc) Mac
Svelte version (Please check you can reproduce the issue with the latest release!) 3.17.0
Whether your project uses Webpack or Rollup both reproduce bug
Severity blocking an upgrade to Svelte with bitmasks
Additional context Problem in this check dirty[0] it is falsy
May be dirty should be mutidimensional array? Because it is not