Forced recompile while patching

(Testing with Gamma Preview 05.0335)
Hi,
I’m patching some web stuff, and I had being told that the socket gets connected and disconnected again. When we checked it turned out that the JsonWebToken node I make (which is wrapped in a cache) is somehow being re-triggered as I patch.

This took a while to figure out, but I guess that the recompiler is maybe seeing a code path the was unavailable being made available again and so does some building?

ForcedRecompile Error

Internally the Now(DateTime) node should only be triggered on startup with the data available

In any event, this made development difficult because the remote machine needs to confirm the message is coming from the original connection, so if I patch and the token keeps changing I have to restart the process again. A bit embarrassing working with the web dev.

image

I couldn’t recreate the issue with vanilla vl nodes so it could be related to the JWT nuget I’m using, though I can’t think why. Demonstration doc below.
H

RecomplieError.vl (36.4 KB)

Values of IO boxes get re-initialized on patch changes (not optimal, but that’s the current state), so after every change you end up with a new “Secrets” spread which triggers the Cache region further inside. You have two options here:

  1. Place a pad in between the “Secrets” and the “CreateAuthToken” and put the the upper part on Create
  2. (The safer approach) Inside the CreateAuthToken place a SequenceChanged, connect it to the Force pin of the Cache and remove the existing control point - this guarantees that the region will only run if an actual change happend.
2 Likes

Thanks @Elias , that works. thought I would need that approach with spread because it isn’t copied or mutated, but I’ll bare it in mind. I maybe shouldn’t ask on this thread but I’m aloso noticing that IOboxes that should have null outputs are holding the last non-null value, which is confusing things a bit. Is this related to the above issue?

image