PDA

View Full Version : All of my build rules are being ignored...?


jdavidi
11-04-2003, 04:04 PM
Hi all,

I'm attempting to work with some build rules, but I can't get any to fail. No matter what conditions I apply, even to the sample projects, all steps are always attempted. Here's where I started:

Essentially, I have a macro, %VERSION%, which can have the value "8.02" or "8.01" (minus the quotes). I want to to perform a particular step only if the version equals "8.01". I input %VERSION% into the 'Build Only If...' field and set the dropdown to 'is equal to' and set the value to 8.01 . The step continues to work however, whether my %VERSION% macro evaluates to 8.01, 8.02, ZEBRA, or kj984731hkdsk. I just can't get it to fail...

I tried playing with the sample projects, Advanced.bld in particular. I reset the value of %FILETOFIND% to something bogus ("C:\WINNT\WIN.INIF"), but even this build step is still attempted (it fails because it can't find that file of course), but if I'm reading the documentation right the build attempt shouldn't have been made.

Am I just flat out missing something here? Or do I have some weird setting enabled that disables build rules somehow?

Thanks in advance!

--JDAVIDI

jdavidi
11-04-2003, 04:09 PM
Sorry, forgot to mention that I'm on version 5.0

kinook
11-04-2003, 05:33 PM
How are you building the step(s)? If you're using Rebuild Selected (Ctrl+F7), build rules (and completion status) are ignored and the step is built unconditionally. This functionality is an ad hoc feature to allow rules to be explicitly bypassed.

You need to use one of the regular build methods in order for build rules to be evaluated. See http://www.visualbuild.com/Manual/?methodsofbuilding.htm for a description of the available build methods; this thread also describes some of them: http://www.kinook.com/Forum/showthread.php?threadid=170

jdavidi
11-13-2003, 09:20 AM
That's exactly was I was doing (running the Rebuild Selected and Test commands).
Thanks so much for pointing that out!

wellilein
09-06-2007, 09:11 AM
I really spent 2 hours on this today! Is there really a customer who wants that rebuilding a step ignores the conditional rules? This is amazingly unexpected behaviour.

Why isn't there an explicit command in the context menu "Rebuild selected (ignoring rules)"? Maybe the existing entry could be renamed so that users are warned...

When a build fails, I sometimes completed it by selecting all of the remaining steps, calling "Rebuild selected". Well, this could be the reason why we sometimes have had releases which really didn't work well! We probably spent thousands of € not knowing about this "feature", wondering why the last build was quite good and this build is as erroneuos as never before.

Yes, of course: it is mentioned in the help file. It is my own fault not reading all that stuff...

BTW: The button "Test" also performs a "REBUILD selected", although the tooltip says "Saves the changes and BUILDs the step". It has exactly the same problem. It's also described in the help file...

So now after all my frustration here are my final questions: how can I execute a single step WITH rules? How can I execute multiple selected steps WITH rules?

kinook
09-06-2007, 10:43 AM
Use Build | Start (F7) to continue a failed build or Build Next Step (F10) to build only the next step.

To start building at a specific step, use Build From Cursor (Alt+F7) or Start From Cursor (Alt+F10), and then use F10 to build step-by step, or Build To Cursor (Ctrl+F10), or set a breakpoint and use F7 to build to the breakpoint.

You can also build or rebuild an individual group of steps (the selected step and all children) via Build Step Group (Alt+F8) or Rebuild Step Group (Shift+F8).

The purpose of Rebuild Selected is to allow explicitly rebuilding steps that might already be completed, are unchecked, or whose build rule evaluates false. Comparable to rebuilding your project being recompiling even if up-to-date, while building in Visual Build is akin to building your project (only what has changed/not complete yet).