Skip to content

Conversation

@polac24
Copy link
Collaborator

@polac24 polac24 commented Mar 7, 2023

This PR adds support for static frameworks with multiple architectures. If a static framework contains multiple architectures, input arguments to libtool do not have path extensions (contrary to static libraries, where .a is always used). XCRemoteCache to recognize input files by expecting '.a` extension. To support a case for static frameworks, this PR adds the same behavior where a file with no extension is passed.

In this PR, an E2E test to cover a scenario described in #184 is added:

  • For the StandaloneSampleApp, a new static farmework StaticFramework is added
  • In an E2E flow, an extra step added to validate compilation of the StaticFramework for WatchOS simulator
  • By the way, fixing an E2E script to fail an xcodebuild step. Previously, failed xcodebuild was not propagated, because | tee .. was swallowing an error.

Refactoring&Fix summary:

Fixes #184

@polac24 polac24 mentioned this pull request Mar 7, 2023
case "-dependency_info":
dependencyInfo = args[i + 1]
i += 1
case let input where ["", "a"].contains(URL(string: args[i])?.pathExtension):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here is the single line change that this PR introduces. Previously it was,

            case let input where input.hasSuffix(".a"):

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To verify that a change would be caught: #186

@polac24 polac24 force-pushed the bartosz/20230306-watch-library branch from 9d88208 to 8201f77 Compare March 8, 2023 10:49
'EXCLUDED_ARCHS' => 'arm64'
}
args = ['xcodebuild']
args = ['set -o pipefail;', 'xcodebuild']
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

errors in xcodebuild were not failing a step as args.push("| tee #{LOG_NAME}") was swallowing an error.

@polac24 polac24 merged commit 2f10c6a into spotify:master Mar 8, 2023
@polac24 polac24 deleted the bartosz/20230306-watch-library branch March 8, 2023 20:21
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.

[WatchOS] 'Producer' mode failed with static framework

2 participants