Source scripts and code modules-- do only development boxes need them?

Post Reply
Mr. Bigglesworth
Posts: 56
Joined: Fri Feb 16, 2001 6:54 pm

Source scripts and code modules-- do only development boxes need them?

Post by Mr. Bigglesworth »

We're fighting a little confusion over here with regard to source scripts, code modules, vtx files and what combination needs to be on a given machine.

We have a development machine where we code up our vortex scripts. To make things go easier, we of course make full use of code modules and the <USES> command in vortex.

After we're done compiling our scripts, we then copy the source and .vtx files to our live server. Problems in the past have occurred when we've copied over both the source and vtx files to the live server, and then, later on, *only* copied an updated vtx file to the live server, forgetting about the source script. It appears that the live server will attempt to recompile the old script? I'm not 100% positive about that, but it seems to be the case.

At any rate, we're used to copying both source and vtx files live, but were wondering if there is any sort of problem in deleting the source files and going "vtx only" on the live server. Also, whenever we've created a live server, we generally recreate the code modules on it, then ignore them from then on, never updating them. It's an old habit by now.

Is there a problem in removing the code modules (wipelib-- my favorite command!) altogether from the live server, or do the vtx files copied over somehow require at least code module skeletons to exist on the live servers? Maybe there are certain types of code modules we would need on the live server, but others not? Thanks again for the tips and advice.
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Source scripts and code modules-- do only development boxes need them?

Post by Kai »

If the Vortex version is identical on both servers, then you can copy just the .vtx files over, and no source or modules whatsoever need to exist. A .vtx is recompiled only when the Vortex executable running it is a different version than that which created the .vtx, or the source file (or any source module used when originally compiling) exists and is newer than the .vtx. Checking in a new module will cause any .vtx files that used it (directly or not) to need recompilation.

Basically, if you're copying any source files over, you ought to copy them all, including modules, so that they're available if a recompile happens because of new timestamps on the source file(s). You may be running into race conditions where you've copied a module over, the server sees it's new and tries to re-compile a script that depends on it, but you've yet to copy over the remaining modules or files for that script. Ideally, the copy should be to a new (temp) name, then renamed to the live .vtx, so that the file appears instantly, not partially over several seconds (possible run-time errors/ABENDs).
Post Reply