Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Suppress unresolved references in build
Message
From
08/06/2011 09:30:22
 
 
To
08/06/2011 03:08:23
General information
Forum:
Visual FoxPro
Category:
Project manager
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01513358
Message ID:
01513521
Views:
88
>>Project a and project b include class A, class A calls form A. Don't need form A in project a but do in project b. recompiling wants to suck it in or produce an resolved reference error. Any way to:
>>
>>1) exclude Form A from project a without coding the exclusion in every call -- do we have to add it to the project and exclude it?
>>2) suppress errors for unresolved references?
>
>Coming in late: Craig's analysis is correct, although I prefer Gregory's syntax ;-)
>But for me the question is, why you dislike
>
>> do we have to add it to the project and exclude it?
>
>that much.
>
>regards
>
>thomas

Because we have moved to building the exe's from inside the VFP IDE to TFS Build server and there cannot be any unresolved references. Of about 60 calls to 20 forms or prgs or classes (that never happens form the 2nd app due to a global var that prevents it), each of those 20 forms call other prgs, classes, and forms and we don't want to dump all of those into this one project. When there are unresolved references, the TFS Server shows the build as failed. I really do not want to go through all of the prgs and forms and classes and change how each really unneeded called routine is coded. The same code, classes, forms etc are used by multiple projects and it would have a regression testing impact on all of them. If I did that, my personal choice would be the pre-processor directives and compile time constants which are clearer I think. I've tested that and it works well, but also triggers regression testing of every project. Also, we want the other projects to look for and force the inclusion of those pieces into their projects. It is just one project that I don't need it to occur.

#define FOO_BAR false


#ifdef FOO_BAR and then or maybe #If FOO_BAR...#Elif....#Endif
*--Whatever
#else
*--pass the form to the form manager (also checks there for FOO_BAR)
*--in some cases we just use DO FORM ..... or call a method in main.prg from an external excluded fxp to do the form, etc
#endif

or

#IFNDEF FOO_BAR

Etc...

In most places, we already have a global var set to not run those forms if true and it is set to true in the main prg of the project and then checked but that doesn't prevent the project from sucking them in. There are many methods that seem to work to handle it, each of those presented we tested -- long term wise either Greg's solution (which we use already in many cases but in most places we want the other projects sharing that code to know a form is missing from the project so it's not used every where), or the compiler stuff I would prefer personally, but a quick and dirty fix is to use the dummy forms, or the add to the project but exclude (then we have to fix the Vault folders etc) so only the dummy forms (which call nothing) added the project is the fastest and simplest for immediate builds but not a good long-term solution.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform