Bedrock.Cube.Data.Clear
Posted: Sun Mar 08, 2015 11:50 pm
Just a little warning in case anyone else gets hit in the face with this like I just did.
A couple of years back we had some contractors in who implemented a system using Bedrock. Cool, no problem, there are far worse ways of doing things. Though it's only recently that I've started to spread it to our legacy servers. Version 3 is now out but I opted to stay with version 2 since I didn't want to run the risk that anything had changed in version 3 that might break the aforementioned system. So by downloading the version 2 package and installing that on the other servers I was playing it safe. Or so I thought.
Now, call me old fashioned but I was once told that you should look upon a function signature as a "contract" between the developer and the people using their functions, such that you do not change the terms of that contract. Sure, expand arguments if you want to add new features in later versions, but the original ones should remain inviolate.
So when I wrote some new standard cross-server code I was a tad surprised to hear "BOOOOOMMMM!!!" coming out of the server log file with:
What the...?
So I took a look at the process on the contractor-built server (where I developed the new standard code), and then on the legacy server that I had installed Bedrock on and lo: Ooooh-kay, that explains the "Boom". So I took a look at the Prolog and found that the contractor-built version was 2.0, while the one that I had downloaded was 2.0.2. But surely there was at least a warning about this in the documentation? Er, no. In fact the documentation uses the parameter name pDeleteTempObj, which obviously doesn't appear in either version. And as demonstrated above TI does not like to be told to use arguments which don't exist.
I could of course update the contractor-built server to use the 2.0.2 process, but that would cause me to wonder what else would break and which I wouldn't know about until it did. But of course if I don't then the new standard code will only work where 2.0 is installed. Though fortunately in this case omitting the argument entirely and using the default will work for my purposes. It may not work for yours.
Rock => Me <= Hard Place.
Time to hit Notepad ++ and see which other processes make a call to version 2.0 of Bedrock.Cube.Data.Clear. Ah 127 hits. Oh goodie.
This is not likely to be the least frequently used function in the library (as per above), so I thought this would be a relevant warning for any Bedrock users who are upgrading to a newer version.
A couple of years back we had some contractors in who implemented a system using Bedrock. Cool, no problem, there are far worse ways of doing things. Though it's only recently that I've started to spread it to our legacy servers. Version 3 is now out but I opted to stay with version 2 since I didn't want to run the risk that anything had changed in version 3 that might break the aforementioned system. So by downloading the version 2 package and installing that on the other servers I was playing it safe. Or so I thought.
Now, call me old fashioned but I was once told that you should look upon a function signature as a "contract" between the developer and the people using their functions, such that you do not change the terms of that contract. Sure, expand arguments if you want to add new features in later versions, but the original ones should remain inviolate.
So when I wrote some new standard cross-server code I was a tad surprised to hear "BOOOOOMMMM!!!" coming out of the server log file with:
Code: Select all
7128 [2] ERROR 2015-03-08 22:16:33.238 TM1.Process Parameter "pRetainTempObj" not found in process "Bedrock.Cube.Data.Clear"
7128 [2] ERROR 2015-03-08 22:16:33.254 TM1.Process Process "MyProcess'Name": : Could not initialize process
So I took a look at the process on the contractor-built server (where I developed the new standard code), and then on the legacy server that I had installed Bedrock on and lo: Ooooh-kay, that explains the "Boom". So I took a look at the Prolog and found that the contractor-built version was 2.0, while the one that I had downloaded was 2.0.2. But surely there was at least a warning about this in the documentation? Er, no. In fact the documentation uses the parameter name pDeleteTempObj, which obviously doesn't appear in either version. And as demonstrated above TI does not like to be told to use arguments which don't exist.
I could of course update the contractor-built server to use the 2.0.2 process, but that would cause me to wonder what else would break and which I wouldn't know about until it did. But of course if I don't then the new standard code will only work where 2.0 is installed. Though fortunately in this case omitting the argument entirely and using the default will work for my purposes. It may not work for yours.
Rock => Me <= Hard Place.
Time to hit Notepad ++ and see which other processes make a call to version 2.0 of Bedrock.Cube.Data.Clear. Ah 127 hits. Oh goodie.
This is not likely to be the least frequently used function in the library (as per above), so I thought this would be a relevant warning for any Bedrock users who are upgrading to a newer version.