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

Fix tuist edit when project contains a Templates folder #4744

Conversation

michaelmcguire
Copy link
Contributor

Resolves #4743

Short description 📝

Templates can import the ProjectDescriptionHelpers target/project. If a Template does this, the generated workspace/project from 'tuist edit' will sometimes not compile because the Templates target may be built before ProjectDescriptionHelpers. This change explicitly adds that dependency in the generated project to ensure ProjectDescriptionHelpers is built before Templates.

How to test the changes locally 🧐

Create a Tuist project with both ProjectDescriptionHelpers and a template where the helpers are imported. Run tuist edit --permanent, open the Manifest.xcworkspace and make sure the workspace compiles.

Checklist ✅

  • The code architecture and patterns are consistent with the rest of the codebase
  • The title of the PR will be used as changelog entry, please make sure it is clear and suitable
  • In case the PR introduces changes that affect users, the documentation has been updated
  • Contributors have checked that, if needed, the PR includes the label changelog:added, changelog:fixed, or changelog:changed

Templates can import the ProjectDescriptionHelpers target/project. If a Template does this, the generated workspace/project from 'tuist edit' will sometimes not compile because the Templates target may be built before ProjectDescriptionHelpers. This change explicitly adds that dependency in the generated project to ensure ProjectDescriptionHelpers is built before Templates.
@danieleformichelli danieleformichelli changed the title Create dependency on ProjectDescriptionHelpers from Templates Fix tuist edit when project contains a Templates folder Sep 14, 2022
@danieleformichelli
Copy link
Collaborator

@allcontributors add @michaelmcguire for code

@allcontributors
Copy link
Contributor

@danyf90

I've put up a pull request to add @michaelmcguire! 🎉

@danieleformichelli danieleformichelli added the changelog:fixed PR will be listed in the Fixed section of CHANGELOG label Sep 14, 2022
Copy link
Collaborator

@luispadron luispadron left a comment

Choose a reason for hiding this comment

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

Thanks for this!

@danieleformichelli danieleformichelli merged commit f4c8133 into tuist:main Sep 15, 2022
@mohamadrezakoohkan
Copy link

Similar issue is already happening but this time for a Plugin with Template. Template is unable to identify files, classes, etc.. from Plugin/ProjectDescriptionHelpers

@jarnal
Copy link

jarnal commented Apr 5, 2023

@mohamadrezakoohkan I have the exact same issue, did you manage to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:fixed PR will be listed in the Fixed section of CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated Manifest.xcworkspace does not compile if a template uses ProjectDescriptionHelpers
6 participants