Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding project reference targets in multiple targets #1108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mqzkim
Copy link

@mqzkim mqzkim commented Jul 19, 2021

To solve this, #933
Add dependencySet to avoid duplicate project reference targets

  • Added test code for MultipleXcodeProject with MultipleTargetDependencies

Also)
- Project framework would be included frameworkFiles.

# Add dependencySet to avoid duplicate project reference targets
@PaulTaykalo
Copy link
Contributor

if there are mutliple targets with the same depdency on same target from project reference, this fix will set incorrect dependencies

@mqzkim
Copy link
Author

mqzkim commented Feb 24, 2022

if there are mutliple targets with the same depdency on same target from project reference, this fix will set incorrect dependencies

@PaulTaykalo Would you provide any example that I can reproduce your issue?

@simonpierreroy
Copy link

simonpierreroy commented Mar 15, 2023

I tried to see what an Xcode generated setup would look like. It seems this PR is definitely on the correct path.
Unique PBXContainerItemProxy are needed per target.

Here Parent and ParentTests are linking Child1 and Child2.

@PaulTaykalo Did you have more info on the issues with this PR?

Screenshot 2023-03-15 at 5 55 01 PM

Test.zip

@PaulTaykalo
Copy link
Contributor

Tried this branch again - have the same result.
this update will break dependencies generation with complex depencies.

This is an oversimplified example of our project.
If arrows are dependencies, and B is target from project reference, then for project C, dependency on B target is not present in the XML. (Or it's invalid. Hard to tell).

graph TD
A.pbxproj --> B[Target from B.pbxproj]
C.pbxproj --> B[Target from B.pbxproj] 
linkStyle 1 stroke: red, stroke-width: 2px;
Loading

I can't provide more detailed explanation on this, but this PR breaks that part.
Not sure if I'll be able to drill down to the root cause of the problem

@PaulTaykalo
Copy link
Contributor

Like these deps are not generated:

Incorrect (this PR)

image

Correct

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants