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

[#596][#597] Fix decodeIntIfPresent and related tests #598

Merged
merged 3 commits into from Dec 17, 2020

Conversation

tjwio
Copy link
Contributor

@tjwio tjwio commented Dec 15, 2020

Resolves #596 and #597

Short description πŸ“

Some of our Xcode projects were failing to be decoded due to proxyType being encoded as an Int when decodeIntIfPresent only tries to decode as String/Bool.

Solution πŸ“¦

  • Fix decodeIntIfPresent to try to decode UInt if decoding as String/Bool fails.
  • Fix _____BuildPhaseTests to properly check failure cases now that decodeIntIfPresent doesn't wrongly throw when trying to decode encoded ints.

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

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

  • Fix `decodeIntIfPresent
  • Fix tests
  • Run tests
  • Test in failing project

@codecov
Copy link

codecov bot commented Dec 15, 2020

Codecov Report

Merging #598 (6d3c4fa) into main (a8cef44) will increase coverage by 0.03%.
The diff coverage is 96.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #598      +/-   ##
==========================================
+ Coverage   84.21%   84.24%   +0.03%     
==========================================
  Files         154      154              
  Lines        8668     8672       +4     
==========================================
+ Hits         7300     7306       +6     
+ Misses       1368     1366       -2     
Impacted Files Coverage Ξ”
.../Extensions/KeyedDecodingContainer+Additions.swift 92.00% <88.88%> (+11.04%) ⬆️
...jects/BuildPhase/PBXCopyFilesBuildPhaseTests.swift 100.00% <100.00%> (ΓΈ)
...ects/BuildPhase/PBXFrameworksBuildPhaseTests.swift 100.00% <100.00%> (ΓΈ)
...Objects/BuildPhase/PBXHeadersBuildPhaseTests.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 a8cef44...6d3c4fa. Read the comment docs.

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.

Thanks for fixing this @tjwio πŸ™. Would you mind updating the CHANGELOG? We can merge afterward.

@tjwio
Copy link
Contributor Author

tjwio commented Dec 17, 2020

@pepibumur updated πŸ™‚

@pepicrft pepicrft merged commit 69ec1a2 into tuist:main Dec 17, 2020
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.

JSON decoder not properly decoding proxyType in some projects
2 participants