tuist / XcodeProj

πŸ“ Read, update and write your Xcode projects
https://xcodeproj.tuist.io
MIT License
2.03k stars 309 forks source link

Use `Runnable` in `ProfileAction` #703

Closed maxwellE closed 2 years ago

maxwellE commented 2 years ago

This matches the behavior of LaunchAction by accepting the more abstract Runnable type

brentleyjones commented 2 years ago

Application extension schemes (like WidgetKit Extensions) need to use a RemoteRunnable, similar to what caused LaunchAction to change to the Runnable based initializer.

maxwellE commented 2 years ago

@kwridan It looks like LaunchAction does not use buildableProductRunnable so in a sense we have already engaged a breaking API design by forgetting to update ProfileAction when doing that migration

kwridan commented 2 years ago

@kwridan It looks like LaunchAction does not use buildableProductRunnable so in a sense we have already engaged a breaking API design by forgetting to update ProfileAction when doing that migration

Thanks @maxwellE, indeed this was a breaking change between and v6.7.0 v7.0.0 via https://github.com/tuist/XcodeProj/pull/400

I'm not against this per se, but we would be good to avoid needing a major release just now if we're able to maintain compatibility with the existing method, if that isn't feasible or introduces complexity we can make a major release with this breaking change.

brentleyjones commented 2 years ago

I think having a new base init for Runnable and having the old one call into it is a fine compromise.

codecov-commenter commented 2 years ago

Codecov Report

Merging #703 (4da741e) into main (e651344) will decrease coverage by 0.13%. The diff coverage is 48.78%.

@@            Coverage Diff             @@
##             main     #703      +/-   ##
==========================================
- Coverage   84.93%   84.79%   -0.14%     
==========================================
  Files         157      157              
  Lines        9127     9170      +43     
==========================================
+ Hits         7752     7776      +24     
- Misses       1375     1394      +19     
Impacted Files Coverage Ξ”
...rces/XcodeProj/Scheme/XCScheme+ProfileAction.swift 49.05% <25.00%> (-8.78%) :arrow_down:
Tests/XcodeProjTests/Scheme/XCSchemeTests.swift 100.00% <100.00%> (ΓΈ)
...urces/XcodeProj/Extensions/AEXML+XcodeFormat.swift 92.45% <0.00%> (ΓΈ)
...eProjTests/Extensions/AEXML+XcodeFormatTests.swift 100.00% <0.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 e651344...4da741e. Read the comment docs.