Understanding Global Project Linking

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Colum
Propeller Head
Posts: 44
Joined: Thu Apr 11, 2013 3:15 am
Location: The (not so) United Kingdom
Contact:

Understanding Global Project Linking

Post by Colum »

I've been reading up on global project linking. It sounds like something that would be useful to us, but I want to ensure my understanding of how it works in practice is correct.
- I want to have a single (master) project with CSS, master pages, targets, destinations, etc, but no topics.
- Multiple (slave) projects contain topics that will be linked to the master project by importing the various files as required.
- If changes are made to any of the files in the master project, they are automatically propogated to all the slave projects.

If my understanding is correct, the key to this is ensuring the Auto-reimport before "Generate Output" check box is selected when performing the file import. This ensures that changes made in the master project are reimported into the slave project provided the import file is still located in the project's Import directory. If the Auto-reimport before "Generate Output" check box isn't selected, you have to manually reimport the file.

Supplementary question: If I'm right, the files are only imported when you generate the output, not before. So it is possible that changes have been made to a file in the master project and linked using global linking that don't appear in the slave project. At least until you generate the output.

Additional supplementary question: Is there a way to report / list the files that are linked using global project linking.
Many thanks in advance.
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Understanding Global Project Linking

Post by NorthEast »

Yep, all of that's correct.

Using Auto-reimport means it'll re-import any updated files when you start a build.
* Files are re-imported if the file's time stamp is newer on the master project than the child project.
* If the file is newer on the child project, it's not automatically re-imported. You must do a manual re-import if you want to update these files.

You can manually re-import at any time, if you don't want to start a build.

You can open the import file in Flare to see which files have been imported, and which files have been removed from the import. Removed files are files you've imported, but have then edited in the child project and chosen to remove.

I'd suggest spending an hour to test it out, using some simple test projects.

The only issue I've encountered with Project imports (GPL) is when using source control on both master and child projects. The project import decides whether a file needs to be updated based on the file's time stamp, but it's possible for the time stamp on the child project to be newer than the master project, depending on when you last retrieved the files from source control. This means files may not automatically be re-imported even though they're actually be out-of-date. In this scenario, you have to manually re-import to overwrite files in the child project. This happened with my projects, and it was a bit of a killer when it came to trusting the automatic re-import.
ajturnersurrey
Sr. Propeller Head
Posts: 346
Joined: Fri Nov 05, 2010 3:30 am

Re: Understanding Global Project Linking

Post by ajturnersurrey »

Perhaps I'm a luddite, but I'd concur with Dave Lee and recommend you should mistrust the auto-import option.

When I use GPL I prefer to get in the habit of doing a manual update before building the target. This means I get to doublecheck what is being updated (or not) before it happens. (Most of the time it is fine, but weirdness in file timestamps that come from opening files on different machines/recovering files from zipped projects and so on, mean that the auto-import option only works reliably in the simplest scenarios.)

I also like to do a manual update whenever I start work on a project that is linked, so that I am seeing the latest changes in stylesheets and such as I work, and not wait for a surprise when I build the target!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Understanding Global Project Linking

Post by ChoccieMuffin »

Our nightly build happens separately and uses files that have been saved to SVN (outside of Flare - I don't want to use Flare's integrated source control) so I make sure that the import files in my child projects are always "clean" in SVN (I add all import files to the ignore-on-commit changelist), and in SVN I don't keep copies of the imported stuff in the child projects, so when the build runs the import files always import everything they've been told to from the Globals project into the child projects. That doesn't affect my ability to run builds on my local machine to check what's going on, but when I check the project in (from outside of Flare) the import files are excluded and the imported topics/stylesheets etc aren't under version control.

I also make a point of NEVER editing files that have been imported from another Flare project. Flare helps by warning you if you try to edit a file, and warns you again if you then try to save it - it gives you the option to save it anyway, or save it and break the link.

GPL works brilliantly for us, as long as we remember those rules. Good luck.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Colum
Propeller Head
Posts: 44
Joined: Thu Apr 11, 2013 3:15 am
Location: The (not so) United Kingdom
Contact:

Re: Understanding Global Project Linking

Post by Colum »

Great advice everyone. Thank you sooooo much :-)
peterb
Propeller Head
Posts: 25
Joined: Tue Mar 21, 2017 12:46 pm

Re: Understanding Global Project Linking

Post by peterb »

I find that most of the time that I'm Reimporting from the master project, it is because I am developing in a child project and realize that I need to set a new global variable or glossary entry. So de facto for me, I am doing a manual Reimport from Master in the child project immediately after making updates to Master. Everyone's situation is different, but I'm with ajturnersurrey in not making a habit of relying on the auto-import.
Post Reply