The Wayback Machine - https://web.archive.org/web/20200915122702/https://github.com/SDWebImage/SDWebImage/pull/2946
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

Totally remove the MapKit integration, including Source Code, Subspec, SwiftPM, fix the issue of SwiftPM on Xcode 11.4 Beta, make it scalable #2946

Open
wants to merge 3 commits into
base: master
from

Conversation

@dreampiggy
Copy link
Contributor

dreampiggy commented Feb 26, 2020

Make it scalable in the future. For example, in SDWebImage 6.0.0, we may provide a Swift overlay shim framework, which may need subspec.

New Pull Request Checklist

  • I have read and understood the CONTRIBUTING guide

  • I have read the Documentation

  • I have searched for a similar pull request in the project and found none

  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

  • I have added the required tests to prove the fix/feature I am adding

  • I have updated the documentation (if necessary)

  • I have run the tests and they pass

  • I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: #2941
This close #2944

Pull Request Description

See #2941 see the reason.

The new MapKit framework repo is here: https://github.com/SDWebImage/SDWebImageMapKitPlugin

…, SwiftPM, fix the issue of SwiftPM on Xcode 11.4 Beta, make it scalable
@dreampiggy dreampiggy requested review from bpoplauschi and kinarobin Feb 26, 2020
@bpoplauschi
Copy link
Member

bpoplauschi commented Feb 26, 2020

@dreampiggy glad to see you are working on this project of separating MapKit into its own repo.
I think it's a good idea, I wanted to do it a few times, but there were always more pressing issues :)

My only concern is we are breaking compatibility, since people that have the 5.5 version will need to make changed to their Podfile in order to keep having the MapKit module.
I think a better approach is to release this change with a major version upgrade (i.e. 6.0) and therefore make it clear that this breaks the compatibility (even if a large number of our users are not using the MapKit integration, it's still the right way to do it according to the semver standard).

@SDWebImage/collaborators what do you think?

@dreampiggy
Copy link
Contributor Author

dreampiggy commented Feb 26, 2020

Actually...In 6.0.0 I have a bigger idea changes, which I want to have a better support for Swift user. The contributor who are famailiar with Objective-C is really hard to find, move to Swift (through it's just a wrapper layer) can make it easy to maintain...

Therefore I think we can refactory our architecture with a Swift-written overlay layer (This SDWebImage become the Objc-Swift mixed framework). This is a major change.

I doubt the break area for users. Because most user basically not integrate MapKit. I do not have a accurate survey, but we can get it through whole GitHub search with Podfile/Podfile.lock.

See:

image

image

@dreampiggy
Copy link
Contributor Author

dreampiggy commented Feb 26, 2020

And, what is SDWebImage/Main, did SDWebImage contains any other subspecs in history ?

@bpoplauschi
Copy link
Member

bpoplauschi commented Feb 26, 2020

@dreampiggy the stats you provided are from open source projects. There are many more closed source projects that are using SDWebImage.
I don't think we can make the decision based on how many people may or may not be using that submodule. We started years ago to follow the semver standard because it has a clear intent of what changes were made in a version and I don't want to bypass it.
Plus, I don't really see why we can't release the MapKit removal in a 6.0 version and make all the Swift changes you are referring to in another major version 7.0.

Looking forward to hearing more opinions here, cause I'm not married to my opinion :) and therefore I don't want to force it if more people are against it.

@dreampiggy
Copy link
Contributor Author

dreampiggy commented Feb 26, 2020

Maybe you're right. Actually I don't want to release next major version because currently, seems there are no huge maintain with the exist APIs...The 6.0.0 changes seems source-code compatible for most cases, but all the downstream dependency who use s.dependency 'SDWebImage', '~> 5.0' need to bump the version... The pay seems more than what they gain. :(

I'll try to find another SwiftPM DSL, hopelly that can workaround Apple's bug. As the comment in #2941 , seems this effect all the Objective-C project contains 2 or more target...I doubt why so huge bug Apple team does not realize. :)

@dreampiggy dreampiggy added the project label Feb 26, 2020
@dreampiggy dreampiggy added this to the Future milestone Feb 26, 2020
@dreampiggy dreampiggy force-pushed the dreampiggy:project_remove_mapkit branch from 2264b8c to 5287e0d Feb 26, 2020
@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2946      +/-   ##
==========================================
- Coverage   83.88%   83.62%   -0.26%     
==========================================
  Files          69       66       -3     
  Lines        7105     6444     -661     
==========================================
- Hits         5960     5389     -571     
+ Misses       1145     1055      -90     
Flag Coverage Δ
#ios ?
#macos 83.62% <ø> (-0.12%) ⬇️
#tvos ?
Impacted Files Coverage Δ
SDWebImage/Core/SDMemoryCache.m 51.72% <0.00%> (-43.63%) ⬇️
SDWebImage/Core/SDImageHEICCoder.m 40.40% <0.00%> (-39.40%) ⬇️
SDWebImage/Private/SDImageAssetManager.m 73.33% <0.00%> (-10.51%) ⬇️
SDWebImage/Core/SDWebImageTransition.m 52.70% <0.00%> (-7.53%) ⬇️
SDWebImage/Core/SDAnimatedImage.m 80.35% <0.00%> (-6.92%) ⬇️
SDWebImage/Core/NSData+ImageContentType.m 79.27% <0.00%> (-5.95%) ⬇️
SDWebImage/Core/SDAnimatedImagePlayer.m 83.26% <0.00%> (-5.49%) ⬇️
SDWebImage/Core/UIImage+Metadata.m 94.73% <0.00%> (-5.27%) ⬇️
SDWebImage/Core/UIImage+MemoryCacheCost.m 78.94% <0.00%> (-2.88%) ⬇️
SDWebImage/Core/SDWebImageDownloaderOperation.m 90.67% <0.00%> (-2.03%) ⬇️
... and 19 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 aa7ff6f...5287e0d. Read the comment docs.

@dreampiggy dreampiggy mentioned this pull request Feb 27, 2020
6 of 8 tasks complete
@dreampiggy dreampiggy modified the milestones: Future, 6.0.0 Feb 27, 2020
@stale
Copy link

stale bot commented Apr 27, 2020

This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
If this is still applicable, please make sure it is up to date and if so,
add a comment that this is still an issue to keep it open.
Thank you for your contributions.

@stale stale bot added the stale label Apr 27, 2020
@stale stale bot removed the stale label Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.