LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW, Perforce, and Multiple Projects/Workspaces

Perforce integrates natively with LabVIEW so you can check out and check in files from within the LV Project explorer, and this generally works well in simple setups.

 

We are experimenting with Perforce because it provides much more powerful facilities for bringing in code from other libraries than either git submodules or svn externals and would allow us to maintain much better traceability of which projects were built with which versions of which libraries etc.

 

It all works fine if I set everything up to use a single workspace. Switching streams empties out the workspace and populates it with the file tree of the new stream, and the LV integrations work perfectly. However, we often want to have multiple projects open at once (eg. a plant controller running on a cRIO and a UI for it running on a windows machine - each being different and independent projects). This is not possible using a single shared workspace, and therein lies the rub.

 

LabVIEW integration must, I assume, use an environment variable or registry entry to determine the currently active workspace. From preferences>source control you can specify a workspace directly or 'use perforce default'. The former 'hard-codes' the workspace and the latter uses whatever is set if you use the Perforce command line or UI to choose a workspace. If you are working in that workspace then all is fine but if you open a project in a different workspace then the integrations break (it doesn't like dealing with files outside of the workspace it thinks it should be working in).

 

Hence having two LV projects open in different workspaces means only one will work properly.

 

The Perforce Explorer Plugin manages this same problem fine by taking its 'current' workspace from a config file that you place at the root of your workspace directory - this tell it the server, user, and workspace name. Therefore, any explorer 'right-click-menu' actions know which workspace they are working from and everything works fine. The precedence used to determine the workspace is first the config file, and if that doesn't exist, the environment settings in the registry. 

 

LabVIEW seems to ignore the config file and just takes the registry setting, which of course can be valid for only one workspace at once. This means having to manually reconfigure the perforce integration every time you want to make edits in a different project.

 

Has anybody run into this problem? Is there any workaround to it? The only way I have been able to work so far is by using a shared workspace but that precludes running more than one project at once (unless they are both in the same stream, which is just silly for independent applications).

 

Is this a bug in LVs Perforce integration (it certainly seems like it)? Is it likely ever to get fixed now that git and svn have the lions share of the source control market?

0 Kudos
Message 1 of 1
(885 Views)