PDA

View Full Version : Delimited macro processing bug?


ericb
01-24-2011, 02:11 PM
We have found what appears to be a bug in Visual Build 7.7. We just upgraded from v6.7a. This concerns the processing of tab delimited macros by the DelimValue functions, which we employ to loop through a list of items for processing. Our build setup and the behavior we are observing follows. This was working perfectly in v6.7a, but there is some odd behavior now in v7.7.

We have a project level macro, which is tab delimited, that contains a list of files we want to process. We set the value of a temporary macro with the value of this project macro, as the delimited macro processing has to be done in a temporary macro. We then enter the loop with a group step, which conditionally runs to repeat while [vbld_AllMacros()("ASPOSE") Is Nothing] is equal to 0 (the macro will be deleted after the last element is removed by the DelimValue functions). The processing is then nested under child steps of this group. The first step removes the first element of the macro and places it into the value of a another temporary macro using the vbld_NextDelimValue. This second temporary macro is used in a subsequent processing step.

What we observe is that when the group step runs to test the condition of the macro existence, it is removing the first element of the delimited macro. Once we enter the loop the vbld_NextDelimValue then pulls the next value from the tab delimited list and removes it from the delimited macro, as expected. The processing step then runs, and it also appears to remove an element from the tab delimited list. The effect is that we skip elements of the tab delimited list, and the delimited macro is not processed fully. Only the second element and every third element thereafter that is processed.

Further if we enter the loop on the last element of the tab delimited list, which is removed by the group step evaluating the existence of the macro, which does exist at the time the step is run, it will fail the routine. The last element is removed, subsequently removing the tab delimited temporary macro, but we have been allowed entry into the child steps. The step to set the second macro, which is used for processing will run, but this value is set to empty because vbld_NextDelimValue is processing a macro that doesn’t exist anymore. Now the processing step fails because the macro it operates on now has no value.

One further note is that this works correctly via the command line app VisBuildCmd.exe. This appears only to be an issue with the GUI app.

We are long time visual build users, and this is causing us quite an issue right now. Is this a bug? If so, can we get a fix?

kinook
01-24-2011, 03:27 PM
http://www.kinook.com/Forum/showthread.php?threadid=4767