LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.lvproj Dependencies and Git

We've been developing a LabVIEW project with multiple developers working on the same code using Git. We've had various difficulties with merge conflicts in the lvproj file that seem avoidable, because they're in the Dependencies section.

 

Depending on what code someone has added to the project on their branch, it might affect what's in the Dependencies list. Especially when dealing with cRIO FPGAs, it seems, the Dependencies list can be quite volatile (it seems to be different depending on whether you've set the FPGA execution mode to be Simulation or on Device).

 

Question: If I were to configure Git to ignore the Dependencies section of the lvproj file when doing diffs, would this cause any ill effects? (I think it's possible to do this using sed commands in the gitignore, TBC) I've tried taking an lvproj and just emptying the Dependencies section using a text editor, and then loading the file in LabVIEW, and there have been no ill effects; when I open the lvproj file in LV it just repopulates the dependencies list, and then when I save it, it will just save that back to disk with the repopulated list.

 

I get the impression that the Dependencies list might just be a way of reducing load times, as it then doesn't have to scan each constituent VI at load to see what its dependencies are?

Message 1 of 4
(1,105 Views)

We never merge the lvproj file.  We use lvclass or lvlib files to keep the developers from getting in each other's way.  Each one is working in a lvlib so they do not change the lvproj file.  Changes to the lvproj are strictly managed and if someone accidentally changes it we throw out the changes.

 

Also, make sure you separate source and compiled code.

 

Regarding files in the dependencies are they files you made or files from the NI folders?


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
Message 2 of 4
(1,101 Views)

@Terry_ALE wrote:

We never merge the lvproj file.  We use lvclass or lvlib files to keep the developers from getting in each other's way.  Each one is working in a lvlib so they do not change the lvproj file.  Changes to the lvproj are strictly managed and if someone accidentally changes it we throw out the changes.

 

Also, make sure you separate source and compiled code.

 

Regarding files in the dependencies are they files you made or files from the NI folders?


That's interesting.  I have never had the issue where more than one developer was working on a LV project at the same time, and I was wondering how this would play out.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 4
(1,096 Views)

@mrendell wrote:

I've tried taking an lvproj and just emptying the Dependencies section using a text editor, and then loading the file in LabVIEW, and there have been no ill effects; when I open the lvproj file in LV it just repopulates the dependencies list, and then when I save it, it will just save that back to disk with the repopulated list.


Using the text editor sound very cumbersome, once you open the lvproj file, automatic linking and compiles and puts everything taken out back in the dependencies again. Not worth it, is my first thought.  If your dependencies are in a separate folder gitignore could easily ignore what in there. But why ignore (not track changes) on files that may be required for source files to run?

 

Git allows merging of source code, my assumption is that developers are working on different parts. It may come down to 1 developer doing the final merge and getting it accepted.  

 

I frequently use a lvproj then have projects inside of projects (sub-projects). There is no end to how you want to break up the code structure.

 

gitignore file should be use to ignore those config/setup files that you do not need tracked.

As stated in a reply above, check the box for "separate compiled code from source code" in your Project properties or all VIs, this will prevent Git from tracking cosmetic VI changes.

 

 

0 Kudos
Message 4 of 4
(1,054 Views)