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

Inherit defaultSettings from the project when the target's defaultSettings is nil #1338

Merged
merged 3 commits into from May 14, 2020

Conversation

pepicrft
Copy link
Contributor

Short description 📝

Someone reported that their project targets got build settings even though defaultSettings was set to nil at the target level, and to none at the project level. As @kwridan found out, it happens because the DefaultSettingsProvider defaulted to essential when the target's defaultSettings is nil.

I'm this PR I'm changing that behavior to inherit the defaultSettings from the project that contains the target.

@pepicrft pepicrft requested a review from a team May 13, 2020 16:59
@pepicrft pepicrft self-assigned this May 13, 2020
@pepicrft pepicrft requested review from marciniwanicki and removed request for a team May 13, 2020 16:59
@codecov
Copy link

codecov bot commented May 13, 2020

Codecov Report

Merging #1338 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1338   +/-   ##
=======================================
  Coverage   75.17%   75.18%           
=======================================
  Files         316      316           
  Lines       10345    10349    +4     
=======================================
+ Hits         7777     7781    +4     
  Misses       2568     2568           
Impacted Files Coverage Δ
Sources/TuistGenerator/Dot/DotGraph.swift 100.00% <ø> (ø)
...es/TuistGenerator/Utils/EmbedScriptGenerator.swift 98.75% <ø> (ø)
Sources/TuistCore/Graph/Nodes/FrameworkNode.swift 100.00% <100.00%> (ø)
Sources/TuistCore/Graph/Nodes/LibraryNode.swift 94.44% <100.00%> (ø)
Sources/TuistCore/Graph/Nodes/TargetNode.swift 82.22% <100.00%> (ø)
...ources/TuistCore/Graph/Nodes/XCFrameworkNode.swift 100.00% <100.00%> (ø)
...ces/TuistGenerator/Generator/ConfigGenerator.swift 97.97% <100.00%> (+0.02%) ⬆️
...es/TuistGenerator/Generator/ProjectGenerator.swift 92.41% <100.00%> (+0.05%) ⬆️
...ces/TuistGenerator/Generator/TargetGenerator.swift 100.00% <100.00%> (ø)
...stGenerator/Settings/DefaultSettingsProvider.swift 100.00% <100.00%> (ø)

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 4339468...5a171a2. Read the comment docs.

Copy link
Collaborator

@kwridan kwridan left a comment

Choose a reason for hiding this comment

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

Awesome 🎉

@pepicrft pepicrft merged commit 25f3b13 into master May 14, 2020
@pepicrft pepicrft deleted the target-default-settings branch May 14, 2020 07:28
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

2 participants