Managing library version updates in a complex library structure

In some cases updating a library version requires a series of invalid interim changes to accomplish the desired final result, which can only be performed using the Library Dependency Editor.

For example, consider a scenario where two products reference different versions of two shared libraries, as shown in the following figure, and you need to update the libraries in one of the products.

Figure: Example of multiple products with shared libraries
Example of multiple products with shared libraries of different versions

Specifically, if you need to update Module B v1 to Module B v2 and Module C to use Warnings v2, you will need to perform several steps, some of which will result in invalid interim results, before ending up with a valid end result. Since you cannot have two different versions of a library in the dependency graph for a library, if you try to update Warnings v1 to Warnings v2 for Module C, the update will be prevented because Module B would still be referring to Warnings v1. The same situation would occur if you tried the same thing for Module B.

Figure: Example of a multi-step change
Example of multi-step change from one version to another

The only way to make the change is if you can make the changes for both Module B and Module C before the final validation can occur. To make these kind of multi-step changes, you need to open Prod Y in the Library Dependency Editor.

From the Library Dependency Editor you can lock the product or library version to allow multiple changes without blocking those that are temporarily invalid. When you lock a product or library, its parent product or library versions are locked as well. As you make each change, the Library Dependency Editor highlights the invalid interim results so they can be easily seen, but does not block them. You continue to make changes until you are satisfied with the end result and all of the relationships between the objects are valid.

So, to accomplish the multi-step changes shown in the example, you would:
  1. Right-click the version Prod Y v1 and click Open with > Library Dependency Editor
  2. Right-click the Product Y version and click Lock.
  3. Right-click the Module B v1 version and click Update Library and select version Module B v2.
  4. Right-click the Module C v1 version and click Lock.
  5. Right-click the Warnings v1 version, click Update Library, and click Warnings v2.
  6. Right-click in the Library Dependency Editor and click Release All.

You cannot release the product or library version until all the invalid results are resolved. If you decide you no longer want to make the changes, you can discard them by using Replace with server revision, which removes the lock on the version and replaces your local copy with the last saved revision in the repository. When you are ready to release the version, you save the changes back to the repository by using Release All Versions.