Beta033
Beta033

Reputation: 2013

Exclude Code from Builds Temporarily

I have a developer that has asked me if there is a way to exclude certain code from deployment.

We run debug and release builds directly from most recent code in source control. She'll check in code and not want it to be included in the build for various reasons. (The root of this is probably a sort of, design on the fly mentality, but that's a long story)

I've thought about telling her to just comment the entry points, but that will limit her ability to test fully, and it's dificult in several of the monolithic applications we have.

I've thought about telling her to shelf the code, but we're stuck on VSS 6 that doesn't seem to support shelving. (Is there a hack to mimic shelving?)

I've thought about telling her to include precompilier directives to wrap the code that she wants to exclude.

All of these solutions have their obvious problems, so i'd thought i'd try asking the Internet communities.

What do you all do for this sort of problem? What would you do if you had these problems?

Thanks for all your help.

Upvotes: 0

Views: 71

Answers (3)

Paddy
Paddy

Reputation: 33857

Move to a proper source control system, and get into branching - we've just migrated from VSS to GIT - no looking back...


Looking back from the future to this question, I would still heartily recommend leaving VSS, however anyone else finding this question may also want to look into Feature Toggles as a way of getting development code into deployed builds but not be accessible until toggled.

Upvotes: 2

Anton Gogolev
Anton Gogolev

Reputation: 115741

You can always exclude blocks of code with standard #if/#endif "preprocessor" directives. This is very cumbersome, however. It would be much better if you moved from VSS to SVN or GIT.

As for "features she doesn't want on a build", see the so-called "mainline model" here and here.

Upvotes: 0

A S
A S

Reputation: 416

In this situation I'd suggest precompiler directives - you say there are obvious problems with that though? I might be missing the point, but what is the issue there?

Upvotes: 0

Related Questions