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

Generate project references before targets #518

Conversation

evandcoleman
Copy link
Contributor

Short description πŸ“

Previously, targets were generated before project references. This means that any build files in your main project that reference build files in another project will be generated with non-deterministic UUIDs.

Solution πŸ“¦

Generate project references before generating targets

Implementation πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

This bug was surfaced to me while implementing a new feature in XcodeGen (yonaskolb/XcodeGen#701) which allows you to link with targets in external Xcode projects. Every time the project was generated, the UUIDs of the PBXBuildFiles were different. I realized that this is because the PBXProductReferenceProxy object still had a TEMP UUID by the time it got to generating build phases for the main project. After changing the order of generating, the problem went away because the reference proxy no longer had the temporary UUID.

Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @evandcoleman. Your fix makes a lot of sense. I'd just add a test to prevent the introduction of regressions in the future. After that, we are good to merge this PR.

@evandcoleman
Copy link
Contributor Author

@pepibumur done!

@yonaskolb
Copy link
Collaborator

Thanks @evandcoleman!
@pepibumur looks like the changelog check is failing, and tests aren’t running

@pepicrft
Copy link
Contributor

Thanks a lot @evandcoleman. You can ignore that, it's a bit flakey so I'll have to look into it.

@pepicrft pepicrft merged commit 85ee837 into tuist:master Jan 29, 2020
@evandcoleman
Copy link
Contributor Author

@pepibumur Thanks! When can we expect this to be included in a release? Or is that something that I'm able to do and open a PR with the changes?

@evandcoleman evandcoleman deleted the fix/edc/deterministic-project-references-product-uuids branch January 29, 2020 15:39
@pepicrft
Copy link
Contributor

@pepibumur Thanks! When can we expect this to be included in a release? Or is that something that I'm able to do and open a PR with the changes?

I just released 7.7.0 so self-serve.

@evandcoleman
Copy link
Contributor Author

Awesome, thank you!!

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.

None yet

3 participants