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

Do Not Create Derived/InfoPlists Folder When No InfoPlist Dictionary Specified #456

Merged

Conversation

adamkhazi
Copy link
Contributor

Resolves #449

Short description 📝

Running tuist generate will always create a Derived/InfoPlists folder on disk even if it isn't required.

This pull request should fix creating the Derived/InfoPlists unnecessarily when an InfoPlist dictionary is not specified.

Solution 📦

Check targetsWithGeneratableInfoPlists is not empty before creating the Derived/InfoPlists folder otherwise do not create the folder.

Implementation 👩‍💻👨‍💻

Detail in a checklist the steps that you took to implement the PR.

  • Add check for targetsWithGeneratableInfoPlists not being empty before creating Derived/InfoPlists folder
  • Add test inside DerivedFileGeneratorTests that checks that when an InfoPlist file is specified no folder is created on disk

Test Plan

  • Use tuist generate within fixtures/ios_app_with_frameworks
  • Verify that App has no Derived/InfoPlists folder
  • Verify that Framework1 has Derived/InfoPlists folder
  • Verify that Framework2 has no Derived/InfoPlists folder

@tuistbot
Copy link
Contributor

tuistbot commented Jul 23, 2019

1 Warning
⚠️ Have you introduced any user-facing changes? If so, please take some time to update the documentation. Keeping the documentation up to date makes it easier for users to learn how to use Tuist.

Generated by 🚫 Danger

@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #456 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #456      +/-   ##
==========================================
+ Coverage   92.07%   92.07%   +<.01%     
==========================================
  Files         319      319              
  Lines       16487    16502      +15     
==========================================
+ Hits        15180    15195      +15     
  Misses       1307     1307
Impacted Files Coverage Δ
...torTests/Generator/DerivedFileGeneratorTests.swift 100% <100%> (ø) ⬆️
...uistGenerator/Generator/DerivedFileGenerator.swift 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5879482...fa10b69. Read the comment docs.

@pepicrft
Copy link
Contributor

Thanks for tackling this @adamkhazi 👏

@pepicrft pepicrft merged commit bd1897a into tuist:master Jul 24, 2019
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.

An empty Derived/InfoPlists folder is always generated on disk
3 participants