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 spm support #1

Merged
merged 4 commits into from
Jun 11, 2021
Merged

Add spm support #1

merged 4 commits into from
Jun 11, 2021

Conversation

tahirmt
Copy link
Owner

@tahirmt tahirmt commented Jun 10, 2021

SPM does not support mixing Objective-C and Swift in one target. To get around this limitation we now define multiple targets that are swift and objc exclusive. Nimble-Snapshots-Swift-Core is needed so we can expose CurrentTestCaseTracker to Objective-C as we need to register it in the load function which isn't supported by swift. Nimble-Snapshots-Core contains all the Objective-C code importing the swift core framework.

Finally, the product Nimble_Snapshots imports both of these and creates one binary that the consumers can use.
We also use @_exported import for the internal frameworks so consumers don't need to import them to use the code.

@tahirmt tahirmt force-pushed the add-SPM-support branch 6 times, most recently from 4b2c102 to 32b4a77 Compare June 11, 2021 12:23
@ketenshi
Copy link
Collaborator

Can you speak to why Swift-Core and Core are needed to get SPM working?

@tahirmt
Copy link
Owner Author

tahirmt commented Jun 11, 2021

Can you speak to why Swift-Core and Core are needed to get SPM working?

@ketenshi added a description to the PR explaining this.

@github-actions
Copy link

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

Copy link
Collaborator

@ketenshi ketenshi left a comment

Choose a reason for hiding this comment

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

Changes LGTM

I can't resolve convos for some reason

@tahirmt tahirmt merged commit a5d3713 into master Jun 11, 2021
@tahirmt tahirmt deleted the add-SPM-support branch June 11, 2021 15:16
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