You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, do you know smth about such error during tilt up ? load statement within a conditional
I have a load inside if condition
I traced it to this issue and resulting commit from Starlark where they recently disallowed loads inside if statements and for statements.
There's at least one Tiltfile out there that depends on this behavior, and probably more. In fact our own Tiltfiles used to depend on this behavior when we had our internal services in microrepos with one Tilt repo to manage them. The Tiltfile would check to see which microrepos are cloned locally, and only if it was present in the expected location on disk would it then load that microrepo's Tiltfile. In fact: we still recommend this setup. We've since moved to a monorepo, but if any customers are using a similar set up their Tiltfiles would now be broken.
The text was updated successfully, but these errors were encountered:
I think it's pretty clear allowing load() in an if block was a bug in Starlark-Go.
Starlark-Java doesn't allow this, and in fact, can't allow this, because it would break the ability to determine what files are loaded at parse-time (i.e., without executing the code)
We probably have to move forward with #3433 to resolve this, and recommend include() as the execution-time way to load code
@jazzdan do you have a sense of how urgent this is? a short-term fix is to fork starlark-go, rollback the fix for now, and then have a plan to move forward with a workaround
Via k8s slack DM:
I traced it to this issue and resulting commit from Starlark where they recently disallowed
load
s inside if statements and for statements.There's at least one Tiltfile out there that depends on this behavior, and probably more. In fact our own Tiltfiles used to depend on this behavior when we had our internal services in microrepos with one Tilt repo to manage them. The Tiltfile would check to see which microrepos are cloned locally, and only if it was present in the expected location on disk would it then load that microrepo's Tiltfile. In fact: we still recommend this setup. We've since moved to a monorepo, but if any customers are using a similar set up their Tiltfiles would now be broken.
The text was updated successfully, but these errors were encountered: