Where does the rackspace script source code live?

I want to globally replace a certain function call which I use in every rackspace script with a different function call. I see that the rackspace script source code exists in the gig file, within the <SCRIPT_CONTENT> tags inside the element, so I thought that a global search-and-replace inside the gig file would do the trick; however, when I reload the gig, I find that my original, unchanged scripts are still there, even though they don’t seem to exist anywhere in the gig file anymore. Is there somewhere else in my system where they’re being loaded from?

What you do is totally unsupported.
Maybe the compiled code is stored binary in the gig file.

Of course I understand that it’s unsupported; I take frequent backups, and especially so when doing risky things such as what I describe here.

And yes, it occurs to me that the code may be stored in the gig file itself in some obfuscated way (though I’d be surprised if the compiled code, if it is stored in compiled form, could be decompiled, whitespace and comments and all, into the original source), but in case that’s not the case, and if anyone (such as the devs) can point me in the right direction, I’d love to learn.

But that brings me to an idea for scripting.
Search and replace in the script editor.
Globally search and replace for all scripts.


It probably makes for sense to provide support that would allow an external editor to be used

If you are using the same functions in all your scripts then put them in an Include file.

1 Like

Yes, but what to do when a user defined function is called in the on activate callback and now a different function should be called?
Sure change of the used defined function could help.
But also a global search would help a lot to maintain scripts.

First of all, any changes you make to a gigfile is completely unsupported. We reserve the right to change the format, layout, contents, names etc at any time

Yeah, that’s legacy left over from when scripts were only possible in a rackspace and was stored as a child in the rackspace subtree.

In a scriptlet, the actual script is stored as part of the process state (like any other plugin) and so is binary encoded.

I’ll have to get rid of that legacy stuff at some point.

I always use an external editor, and copy-paste every time I need to compile.

And yes, the function call in question is one I defined in an include file, but I’ve changed its parameters, which is why I need to do a regexp search-and-replace across all rackspaces…

Please consider that to be a requested feature… these gig files are humongous! :smiley:

Removing the text of a script will have no impact. The humongous size is 99.999% a consequence of the amount of data given to us from each plugin that we have to save so that the next time you load the gigfile you get exactly the same state.