Xcode Server fails to check out projects with the same repository in two locations

Originator:danielctull
Number:rdar://29042048 Date Originated:1 November 2016
Status:Open Resolved:
Product:Developer Tools Product Version:macOS 10.2.1, Xcode 8.1, Server 5.2
Classification:Serious Bug Reproducible:Always
 
Summary:
If a repository is used as a submodule in more than one location in the project repository structure, Xcode Server only checks it out in one location. As an abstract example, imagine I have an application repository A and two framework repositories F1 and F2. 

In repository A, I add F1 and F2 as submodules.

It turns out that F1 depends on F2 and so F1 has also added F2 as a submodule.

I apologise for my awful ascii art, but the repository structure is something like the following:

A
- F1
  - F2
- F2
     

The isssue is that Xcode Server only checks out F2 once in one place, even though it is required in two locations.

For a more concrete example, I use git submodules to link frameworks that I have made into my apps. My applications and frameworks all use a shared set of configuration files to set Xcode build settings. These configuration files are added as a submodule to the app and framework repositories.

All of my frameworks use this shared set of configuration files. I also have one framework which links to another one as a submodule (as per the more abstract example above). Because of this, I have never been able to use Xcode bots for these projects, even though I have had great success with them using test projects and for building and testing the frameworks separately. I would love to use bots for my application projects!

Steps to Reproduce:
I have made an example repository that demonstrates this problem, so you can simply add it to Xcode bots and watch it fail to clone. It is a test application with one framework, with both the application and framework using a configurations submodule.

All the repositories are read-only so you won't need to set up any SSH keys. :-) 

git://github.com/danielctull-playground/Application.git

Expected Results:
Clone succeeds and building is able to occur.

Actual Results:
An error, probably about missing platform specification – in this case because one of the configuration file sets is missing.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!