fails with error "Failed to extract scope vars from function".
Reason is that livepack_x in 1st eval causes the internal vars prefix num to be incremented, and this affects both inside the eval() and outside. So when the 2nd eval() is entered, the that code is instrumented as:
Attempting to serialize this:
fails with error "Failed to extract scope vars from function".
Reason is that
livepack_x
in 1st eval causes the internal vars prefix num to be incremented, and this affects both inside theeval()
and outside. So when the 2ndeval()
is entered, the that code is instrumented as:This should be
livepack_tracker()
notlivepack1_tracker()
- because the prefix num in the external code is 0 not 1.Prefix num needs to be tracked inside each
eval()
separately not globally. NBnextBlockId
, in contrast, needs to be tracked globally.