<< Back to previous view

[QB-163] QuickBuild's "is clean build" option does not mix with Perforce, which is not aware of file deletions that do not use P4 commands
Created: 16/Nov/06  Updated: 21/Nov/06

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Bryan Dyck Assigned To: Robin Shen
Resolution: Cannot Reproduce Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: Any


 Description   
If you are using Perforce as your SCM, you will run into problems if you ever leave QuickBuild's "is clean build" option set to "yes", as that deletes the working copy of a source tree.

Since Perforce is not aware of file deletions that do not use the corresponding Perforce commands, when the build configuration next tries to sync to head on that repository, it will not sync any of the deleted files. More generally, this eventually results in a build failure, as none of the necessary build files are present in the working copy of the source tree. This problem seems to be exacerbated by the fact that when you manually trigger a build configuration (for the first time), "Is clean build" defaults to "yes" - it's very easy to miss this, especially when giving instructions to others. It would be nice if this defaulted to "no", as many projects in my experience have a specific "clean" target, rather than QuickBuild's "delete the entire source tree" approach.

While it's easy enough to work around this by always making sure that "is clean build" is set to "no", it only takes one miss to run into this and the lost time can be significant for large source repositories and complex build processes.

Perhaps QuickBuild could have a way of either configuring a specific build target that gets executed by the "is clean build" feature, or this feature could be disabled and/or disregarded if a build configuration is using a Perforce repository so as not to cause the working copy to get out of sync with the Perforce depot.

 Comments   
Comment by Robin Shen [ 16/Nov/06 11:16 PM ]
QuickBuild should work with Perforce even when "is clean build" is set to true. When a clean build is performed, QuickBuild will force the checkout of all files (with the -f option of p4 command).

Can you build again cleanly in verbose logging mode, to see what the actual p4 command being executed?

Thanks.
Robin
Comment by Robin Shen [ 19/Nov/06 08:35 PM ]
Bryan,

Please re-open this if you've confirmed that this is a real issue by try the approach I suggested above.

Thanks.
Robin
Comment by Bryan Dyck [ 21/Nov/06 12:14 PM ]
Well, I've confirmed that it's not a problem by testing with a small subset of our Perforce depot... my bad. :)

That said, I still think it would be nice if there was either a way to specify a build target for the "clean" option or have a setting to make the system default for this option to be "no"; a "force sync to head" for our Perforce depot using a typical clientspec is ~ 20 GB, and with that much data, it's simply not an option to delete the entire source tree as part of a regular build. It also makes any accidental "clean" builds (using QuickBuild's clean option) pretty costly in terms of time...
Comment by Robin Shen [ 21/Nov/06 06:28 PM ]
Thanks for the verification. For your request, I've created a new feature request: QB-169
Generated at Fri Oct 03 22:27:01 UTC 2025 using JIRA 189.