Posted on Monday 10 November 2008
In LabVIEW, whenever you change a TypeDef (type definition) any VIs that use the TypeDef will require recompiling and need to be saved. This presents a problem for developers working on a large project with other developers who might be working on code that “feels” the effects of the changed TypeDef.
So, how do you deal with all the unsaved VIs in your project that are not in an area that you “own”? If you don’t save them, then LabVIEW will keep bugging you to save the VIs. And, sometimes your LabVIEW code will even run slower until you save all your VIs. But, if you do save these VIs, then it’s hard to tell which VIs that you’ve saved have “real” changes and not just recompile changes. And, if you commit all the changed VIs, then you might increase the likelihood of creating a conflict with other developers.
Here’s a good process you can follow to deal with this issue:
- First, commit your real changes, separate from the recompile changes. This will give you a specific svn revision (changeset) associated with your real changes.
- Then, save all the recompiled VIs and commit them. For your commit log message, use “Recompiled due to typedef changes” (or similar). This will indicate to other developers that the changes can be ignored, in the event that this revision conflicts with their own changes.
- Finally, Alert your team that you have committed a recompile of code (with no real changes). They can then easily resolve any conflicts, because they know that the commit contains no real changes.
Now, if you know that other team members are actively working on the code and you don’t want to inconvenience them with having to deal with conflicts, you can defer the recompile until a later time or schedule a time for the recompile with your team.
Note: Even if you use a locking system (such as svn locks or a check-in/check-out SCC model) where files for which you don’t have the lock are read-only, you will still have the slow-down issue and will periodically want to do save all to recompile.
Have you had this issue? What solution or process do you use?