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

(Maint)|Export Dynamic library for SwiftPM #148

Merged
merged 3 commits into from
Mar 27, 2020
Merged

(Maint)|Export Dynamic library for SwiftPM #148

merged 3 commits into from
Mar 27, 2020

Conversation

eneko
Copy link
Contributor

@eneko eneko commented Mar 26, 2020

This pull request includes (pick all that apply):

  • Bugfixes
  • New features
  • Breaking changes
  • Documentation updates
  • Unit tests
  • Other

Summary

Applications with extensions (eg. Today Widget) that consume Conduit via SwiftPM will need to import Conduit as a dynamic framework starting in Xcode 11.4.

Implementation

  • Package definition has been updated to export both static and dynamic libraries
    • A new dynamic library has been added as ConduitDynamic

Test Plan

  • Run all tests

@codecov
Copy link

codecov bot commented Mar 26, 2020

Codecov Report

Merging #148 into master will decrease coverage by 0.59%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
- Coverage   79.67%   79.08%   -0.60%     
==========================================
  Files          70       70              
  Lines        2755     2529     -226     
==========================================
- Hits         2195     2000     -195     
+ Misses        560      529      -31     
Flag Coverage Δ
#main 79.08% <ø> (-0.60%) ⬇️
Impacted Files Coverage Δ
Sources/Conduit/Auth/Vendor/KeychainWrapper.swift 39.77% <0.00%> (-3.63%) ⬇️
...es/Conduit/Networking/Images/ImageDownloader.swift 85.10% <0.00%> (-3.03%) ⬇️
...etworking/Serialization/ResponseDeserializer.swift 91.66% <0.00%> (-2.09%) ⬇️
...g/Serialization/FormEncodedRequestSerializer.swift 92.30% <0.00%> (-1.81%) ⬇️
...it/Auth/TokenGrants/OAuth2TokenGrantStrategy.swift 90.00% <0.00%> (-1.67%) ⬇️
...tworking/Serialization/JSONRequestSerializer.swift 90.32% <0.00%> (-1.57%) ⬇️
...e/Coordination/OAuth2TokenRefreshCoordinator.swift 86.66% <0.00%> (-1.57%) ⬇️
...Serialization/MultipartFormRequestSerializer.swift 86.61% <0.00%> (-1.42%) ⬇️
Sources/Conduit/Auth/OAuth2TokenGrantManager.swift 80.48% <0.00%> (-1.34%) ⬇️
Sources/Conduit/Networking/SessionTaskProxy.swift 76.47% <0.00%> (-1.31%) ⬇️
... and 27 more

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 391c3fb...eb6bc95. Read the comment docs.

Package.swift Outdated
Comment on lines 21 to 22
.library(name: "ConduitStatic", targets: ["Conduit"]),
.library(name: "Conduit", type: .dynamic, targets: ["Conduit"]),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will change the current target from static to dynamic, correct? Would it be safer to instead create a ConduitDynamic target?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seemed to me that for most of our apps we were going to need the dynamic one, so I made that one the "default". But yes, we can do it that way. It would prevent any impact on anyone currently using Conduit via SwiftPM without this issue.

Will switch them now.

@eneko eneko merged commit 844e24d into master Mar 27, 2020
@eneko eneko deleted the dynamic/spm branch March 27, 2020 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants