Problems with Flare 10's Perforce integration

This forum is for all Flare issues related to using Source Control.
Post Reply
shannong
Propeller Head
Posts: 17
Joined: Thu Sep 11, 2014 9:24 am

Problems with Flare 10's Perforce integration

Post by shannong »

I've spent roughly 20 hours over the past two weeks trying to make Flare 10's native integration with Perforce work acceptably well for production authoring and SCM among multiple writers. I have created (and obliterated) two stream depots in the testing process, and I've manually created and deleted dozens of test streams and their corresponding workspaces. At this point I have given up, and am now firmly in the camp that recommends the following approach for managing Flare content with Perforce.
Use Flare for what it's good at (editing/renaming/moving/deleting/adding files), use Perforce for what it's good at (branching/integration/changelists/submits), and NEVER try to bind Flare projects directly to Perforce.

Protip: Use a stream depot for your Flare projects even though nothing is actually bound to Perforce. Stream depot workflow and "merge down, copy up" integration is very intuitive and enforces best-practice mainline development strategies, compared to using a classic depot. The Dashboard view is a great tool for helping authors who aren't SCM gear-heads to stay out of trouble and keep streams in good shape.

In each work session:

1) Use P4V to 'get latest' to your local workspace for a stream.
2) Open the workspace's project file and do all the things you normally do in Flare.
3) Use P4V's 'Reconcile offline work' feature to integrate your changes made during that session into useful Perforce changelists, add informative descriptions to those changelists, and submit them to the associated stream."
How broken is Flare 10's native Perforce integration? I did not give up at any one problem. I worked to find the best possible workaround for each problem and the best possible process to minimize the total number of problems. In the end, though, two specific issues made me finally give up:

Showstopper #1: Even when you set up every stream, workspace, and project binding perfectly, the UI performance in a bound Flare project is abysmally, untenably slow. Just scrolling through a content folder with ~100 files in it (in the Content Explorer) has such incredible lag that it's effectively unusable. I can't imagine how much worse it would be with a laggy RDC connection or for workgroups in other countries who are interfacing with a Perforce server halfway across the world. But far worse is the lag when it comes to some action as simple as a file rename. If you rename a file (in Flare itself) when the project is not bound to Perforce, the dialog that presents you with all the corresponding changes to other files is nearly instantaneous. If you rename a file when the project is bound to Perforce, you must wait an incredibly long time (more than a minute or two) before that dialog appears.

Showstopper #2: If the group administrator who branches a new stream makes one tiny mistake in the depot path attribute of the new stream's .flprj file, authors can easily submit changes to the WRONG stream and never know it unless they're triple and double-checking. Similarly, if any author sets up a workspace in the officially documented way for a stream they've never worked with yet, it's a confusing process that can result in the workspace being bound to the wrong stream without the author realizing it.


If the preceding showstopper issues aren't enough to convince you to stay away from binding projects to Perforce, here's a list of all the additional major pitfalls and issues I ran into during testing, in no particular order:

A. No matter how carefully you set up your workspaces and try to enforce naming conventions that help you organize a diverse set of workspaces across many depots, branches, and streams, Flare ignores them. When you open a bound project file, Flare creates an entirely new workspace with a very long, unfriendly workspace name. It doesn't create such workspaces only if you use the "Import project from source control" wizard; it does this even when you open a project that already has correct binding attributes in its project file. So you're effectively forced to always use the confusingly named Flare-created workspaces instead of your own.

B. The official documented process for "Binding a project to source control" specifically states to (paraphrasing) "Open an existing project in Flare, then use the Project Properties dialog to bind to your desired SCM". There are many problems with this approach for Perforce. For starters, you cannot bind a project to anything other than a mainline stream this way. Second, you cannot add more than one project to a mainline stream this way, because the process tries to put the .flprj file and the Content and Project folders at the root of the stream (conflicting with other Content/Project folders that might already be there from a different project). Also, this method sticks an unnecessary "ProjectGuid" attribute in the project file, which might be needed for some SCMs, but is not needed for Perforce. Having this Windows GUID in the project file makes it really difficult to branch anything off of the mainline stream if you prefer each stream in your depot to have a separately-named project file (which becomes mandatory rather than simple preference due to point "D" below). There's no way to generate a unique GUID for each such project file that is branched off the mainline.

C. Because of "B" above, the only effective/easy way to load a mainline stream with a Flare project and create Perforce bindings in the corresponding project file is to use P4V to add the project to the mainline stream, sync it down to a local workspace, and then run the "Import project from source control" wizard, which will put the correct Perforce bindings in the corresponding project file and leave the file checked out in your local workspace for you to submit back to Perforce. Fortunately, this approach does not plop a "ProjectGuid" attribute in the project file. Unfortunately, due to "A"above, this approach requires you to subsequently delete the first workspace you created for the mainline to get to this point.

D. The "Import project from source control wizard" presents a terrible problem as soon as you start having branched streams in your depot. The official documented process for writers to grab a project from their SCM system tells them to use that wizard. Unfortunately, at one point in the process you're presented with a dialog to select the project file from what looks like an expandable depot tree rooted at the depot level (not rooted at the stream level). Even worse, this is not a proper heirarchical view of the server/depot contents. What you see is a single Content folder, a single Project folder, and one instance of every project file in the entire stream depot. If you don't name your various streams' associated project files differently from each other (which is itself a nuisance when it comes to propagating changes among streams), it becomes IMPOSSIBLE to know which of those multiple project files to choose! Even worse, if you choose the wrong one, your local workspace's copy of the project file will have the wrong bindings pointing to the wrong stream, which means an unwitting author might submit some changes to the wrong stream.

E. You can work around the problem described in "D" above by appointing one person to be the administrator for the stream depot and instituting policy that no one may use the import wizard or any Madcap-official documented process. Instead, your policy would require authors to use P4V to create a local workspace for a stream you want to work with, sync the workspace, and then just open the project file from the local workspace folders. However, this triggers the problem described in "A", which requires further policy that all authors must remember to delete the first workspace they created. Realizing that authors are only human, eventually someone will forget to observe this policy, and the duplicate workspaces that stick around can be problematic in a few ways. One obvious example is that if you open duplicate workspace A and check out a file, then in a later work session open duplicate workspace B instead, you'll be wondering why you don't see the pending/submitted changelists you expect to see, or why you see green-colored checkmarks instead of red-colored checkmarks for checked out files, or why you can't revert some pending changes (because they're pending in the other duplicate workspace).

F. You cannot submit ANYTHING from within Flare itself, because even though the "check in" dialog presents a "Comments" box, these comments are NOT added to the changelist that's submitted to Perforce.
livetoski
Sr. Propeller Head
Posts: 135
Joined: Thu Aug 30, 2007 7:10 am
Location: Ottawa

Re: Problems with Flare 10's Perforce integration

Post by livetoski »

Thanks for this. I was stopped at the point where all I wanted to do was bind the project which already existed in Perforce, but since it already existed in Perforce, I couldn't because I needed to create a new stream and I couldn't rename the project through the Flare interface.

Flare actually went ahead with some binding action, based on some messaging when I couldn't get out of the dialog, but clearly wasn't when I checked with the project properties. Very very messy.

I was referencing http://nfasa.wordpress.com/2014/01/01/w ... -perforce/ but she's working with 9.1 Flare, which was when Perforce was not integrated, or supposedly integrated. No matter, Perforce is good, Flare is good, and as Majorie noted anyway, the two can't be trusted in a room alone. They must have broken something in Flare with the integration, as she's using it, or maybe it's special circumstances.
sboltz
Propeller Head
Posts: 25
Joined: Wed Sep 10, 2014 9:59 am

Re: Problems with Flare 10's Perforce integration

Post by sboltz »

I agree, thank you so much for posting your experience and recommendations. I just tried to import a project from Perforce and I get an error which prevents me from even finding it. I was actually hoping to find something on the error, but found your post instead. My project is embedded with the code so I don't have control of the naming conventions or locations in Perforce. I think that based on your comments I will need to check out the project using Perforce and then check it in at the end of the day. This does not lend itself for multiple authors. I'll have to look into how to manage that once I can get the basics working.

I hope I don't encounter weirdness with the depot or naming that you mentioned. Right now I'm in a good spot with just the shell of a project for ground up development, but we need to move fast and I'll be working with a designer who will be helping me with the styling side of things.

I'm keeping my fingers crossed!
Suzette
shannong
Propeller Head
Posts: 17
Joined: Thu Sep 11, 2014 9:24 am

Re: Problems with Flare 10's Perforce integration

Post by shannong »

sboltz wrote:I agree, thank you so much for posting your experience and recommendations. I just tried to import a project from Perforce and I get an error which prevents me from even finding it. I was actually hoping to find something on the error, but found your post instead. My project is embedded with the code so I don't have control of the naming conventions or locations in Perforce. I think that based on your comments I will need to check out the project using Perforce and then check it in at the end of the day. This does not lend itself for multiple authors. I'll have to look into how to manage that once I can get the basics working.

I hope I don't encounter weirdness with the depot or naming that you mentioned. Right now I'm in a good spot with just the shell of a project for ground up development, but we need to move fast and I'll be working with a designer who will be helping me with the styling side of things.

I'm keeping my fingers crossed!
I apologize for the tardy response (I don't check the forums very often).

You do not need to check out the entire project or even specific files using P4V itself. That's the beauty of working with a non-bound project and the "Reconcile offline work" command in the P4V client. Also, working in a non-bound way with Perforce causes zero problems with multiple authors working out of the same Perforce depot with the same workflow.

Here's how the typical workflow for multiple authors goes:

1. (one-time setup) Create a Perforce streams depot and a "main" stream (mainline type). Using the P4V client, create a workspace for the main stream. Next, copy your entire project folder into the root of the workspace folder on your computer. You should have the .flprg file and all the top level folders such as Content, Project, etc. as the root content of your workspace folder. Finally, in the Workspace tree in your P4V client, run "Reconcile offline work" on the root folder of the workspace. Accept the reconcile results, then submit the pending changelist to the "main" stream. Congratulation, you now have a mainline stream populated with your Flare project.

2. Now use the P4V client to create as many development/release streams from "main" as you like. This will branch a copy of the project into each stream. Set up workspaces for each stream. On your local computer, you'll see identical copies of the flare project in each local workspace folder.

3. Daily work: use the P4V client to "work in this stream" for the stream where you want to do work. In the Workspace tree, double-click the .flprj file to launch Flare. When you're done with your edits for the day, use the P4V client to "Reconcile offline work" on the root folder of the Workspace tree. This builds a pending changelist of the specific edits you've made. Now use the P4V client to submit the changelist.

It's that easy. Every author works exactly the same way.
tpcharley
Jr. Propeller Head
Posts: 1
Joined: Fri May 08, 2015 4:21 pm

Re: Problems with Flare 10's Perforce integration

Post by tpcharley »

Can anyone speak to whether these issues are still present in Flare 11? We're currently evaluating Flare for a writing team of 4. We all need to be able to work in the same project, Perforce is our SCM of choice, and we'd prefer a working integration to one we have to work around.
Post Reply