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

[5/y] Improve support for configuring SPM Xcode projects #253

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

andrewchang-bird
Copy link
Contributor

@andrewchang-bird andrewchang-bird commented Dec 26, 2021

Stack:
πŸ“š #254 [6/y] Update example projects
πŸ“š #253 ← [5/y] Improve support for configuring SPM Xcode projects
πŸ“š #252 [4/y] Show help message no mockable types are generated
πŸ“š #251 [3/y] Fix unavailable generic protocol mock initializer
πŸ“š #250 [2/y] Fix generator caching for multi-project setups
πŸ“š #249 [1/y] Optimize dependency graph traversal
πŸ“š #245 Replace SwiftPM with Swift Argument Parser

Current support for Swift Package Manager is a bit rough for both Xcode project and package manifest setups, and we lack clear guidance for the latter in the README (see #236).

One major issue is that using the configurator against an SwiftPM Xcode project links the CLI in derived data with a home-relative path, which isn’t guaranteed to be portable between development environments. Another is that SwiftPM packages which typically rely on path-based source lists must either output each mock file into the Test/TargetName directory or use the default MockingbirdMocks output path and modify the target definition in the manifest.

Since Swift Package Manager is gaining popularity in the iOS ecosystem, it makes sense to streamline our integration and bring it up to parity with CocoaPods and Carthage.

Changes:

  • Make configured build phase portable between machines by rewriting paths in derived data
  • Remove dependency on pcregrep in SwiftPM quick start guide
  • Add ability to specify output directory in generate command

Copy link
Contributor

@ryanmeisters ryanmeisters left a comment

Choose a reason for hiding this comment

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

awesome!

@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/empty-state-message branch from db52aa9 to 8d611fb Compare January 6, 2022 06:19
Base automatically changed from dev/andrewchang-bird/empty-state-message to master January 6, 2022 07:06
- Make configured build phase portable between machines by rewriting
  paths in derived data
- Remove dependency on `pcregrep` in SwiftPM quick start guide
- Add ability to specify output directory in generate command
@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/improve-spm-support branch from 1097640 to d372834 Compare January 6, 2022 07:08
@andrewchang-bird andrewchang-bird merged commit 8ee3e4d into master Jan 6, 2022
@andrewchang-bird andrewchang-bird deleted the dev/andrewchang-bird/improve-spm-support branch January 6, 2022 07:42
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.

2 participants