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

Add RemotePath to RemoteRunnable #555

Merged
merged 2 commits into from
Jul 7, 2020
Merged

Conversation

kwridan
Copy link
Collaborator

@kwridan kwridan commented Jul 4, 2020

Short description 📝

Some schemes (e.g. Watch apps) have a RemotePath attribute set on the RemoteRunnable element.

e.g.

      <RemoteRunnable
         runnableDebuggingMode = "2"
         BundleIdentifier = "com.apple.Carousel"
         RemotePath = "/AppWithExtensions">
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "42BF876824B0EA0700C4B605"
            BuildableName = "WatchApp.app"
            BlueprintName = "WatchApp"
            ReferencedContainer = "container:AppWithExtensions.xcodeproj">
         </BuildableReference>
      </RemoteRunnable>

Solution 📦

Add the missing attribute.

Implementation 👩‍💻👨‍💻

  • Add RemotePath
  • Fix how Equatable works for runnable (due to there being a class hierarchy)
  • Add fixture to test out the new attribute

- For some schemes (e.g. Watch apps) the remote runnable element within the launch action has a `RemotePath` attribute
- This attribute is now added to `RemoteRunnable` as an optional one (as it isn't present in all schemes)
- Updating the way `Runnable` equatable works to ensure it works when comparing subclasses and base classes
- Adding a new fixture to test out the new scheme attributes

Test Plan:

- Verify unit tests pass
@github-actions
Copy link

github-actions bot commented Jul 4, 2020

@kwridan your pull request is missing a changelog!

@codecov
Copy link

codecov bot commented Jul 4, 2020

Codecov Report

Merging #555 into master will increase coverage by 0.49%.
The diff coverage is 98.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #555      +/-   ##
==========================================
+ Coverage   83.58%   84.07%   +0.49%     
==========================================
  Files         152      152              
  Lines        8339     8420      +81     
==========================================
+ Hits         6970     7079     +109     
+ Misses       1369     1341      -28     
Impacted Files Coverage Δ
...ces/XcodeProj/Scheme/XCScheme+RemoteRunnable.swift 91.30% <90.90%> (+91.30%) ⬆️
Sources/XcodeProj/Scheme/XCScheme+Runnable.swift 100.00% <100.00%> (+40.00%) ⬆️
Tests/XcodeProjTests/Scheme/XCSchemeTests.swift 100.00% <100.00%> (ø)
...urces/XcodeProj/Scheme/XCScheme+LaunchAction.swift 89.58% <0.00%> (+0.52%) ⬆️
...rces/XcodeProj/Scheme/XCScheme+ProfileAction.swift 56.57% <0.00%> (+1.31%) ⬆️
...XcodeProj/Scheme/XCScheme+BuildableReference.swift 86.95% <0.00%> (+13.04%) ⬆️

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 e71b130...958e6d5. Read the comment docs.

@kwridan
Copy link
Collaborator Author

kwridan commented Jul 4, 2020

The fixture turned out to be quite a big one with all the default template files added - if needed I can omit it and only add a handful of the .xcscheme files as those are the only ones needed for the test.

@pepicrft
Copy link
Contributor

pepicrft commented Jul 5, 2020

@kwridan thanks for adding this. Just a small question: where are we setting that attribute?

@kwridan
Copy link
Collaborator Author

kwridan commented Jul 6, 2020

Thanks for reviewing @pepibumur - I don't believe this is expose in the Xcode UI / Scheme Editor, however we can see it in the raw .xcscheme file when we manually create new targets (e.g. Adding a Watch App / Extension), and Xcode auto generates a corresponding scheme for it.

e.g.

https://github.com/tuist/XcodeProj/pull/555/files#diff-59648d792327482305a8d10b32beb63cR60

@pepicrft
Copy link
Contributor

pepicrft commented Jul 7, 2020

My bad, when I was reviewing the PR I thought for some reason that it was in the Tuist repository. Changes look good then!

@pepicrft pepicrft merged commit 1a23105 into master Jul 7, 2020
@danieleformichelli danieleformichelli deleted the feature/add-remote-path branch February 18, 2023 12:45
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