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

Update the libwebp dependency to support using 1.0 version and above #2625

Merged
merged 1 commit into from Feb 26, 2019

Conversation

dreampiggy
Copy link
Contributor

@dreampiggy dreampiggy commented Feb 26, 2019

which can fix some rare WebP issues

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: #2431

Pull Request Description

See #2431

Our current 4.x branch's WebP subspec, use the libwebp dependency like this.

webp.dependency 'libwebp', '~> 0.5'

However, since libwebp already bumped version to 1.0 (current latest is 1.0.2), which fix a lots of bugs of WebP decoding && performance. Some of our user and the people from my company want to upgrade to libwebp 1.0. However, current dependency resolve cause we could not upgrade the version.

So, let's update the dependency to use a looser limit of libwebp. I check the code, the libwebp 1.0 is API-compatible with 0.6.1, so it's safe to upgrade.

@dreampiggy dreampiggy added this to the 4.4.6 milestone Feb 26, 2019
@dreampiggy dreampiggy requested review from kinarobin and a team February 26, 2019 05:04
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@bede907). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2625   +/-   ##
=========================================
  Coverage          ?   75.11%           
=========================================
  Files             ?       37           
  Lines             ?     4066           
  Branches          ?        0           
=========================================
  Hits              ?     3054           
  Misses            ?     1012           
  Partials          ?        0

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 bede907...7050a79. Read the comment docs.

@dreampiggy dreampiggy merged commit 4e620c5 into SDWebImage:master Feb 26, 2019
@dreampiggy dreampiggy deleted the project_libwebp_dependency branch February 26, 2019 07:51
@@ -59,6 +59,6 @@ Pod::Spec.new do |s|
'USER_HEADER_SEARCH_PATHS' => '$(inherited) $(SRCROOT)/libwebp/src'
}
webp.dependency 'SDWebImage/Core'
webp.dependency 'libwebp', '~> 0.5'
webp.dependency 'libwebp', '>= 0.5'
Copy link
Member

Choose a reason for hiding this comment

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

... We can't do this IMO, it typically indicates no constrain about the version of libwebp. What if libwebp changed APIs in the future? we'll need to fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

emmmmm....

A good fix, but Is this really useful ? libwebp now have only v1.0.2 version. So even we limit it with <=2.0, this does not actually do anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you care about something in the future, people who use SDWebImage with API-breaked libwebp (maybe 2 years later after libwebp become v2.0 and change the API we use...Since Google libwebp spent 4 years to become v1.0), can still specify the version in the Podfile pod 'libwebp', '~> 1.0'

And, we will release SDWebImage 5.0.0 soon. Which the WebP coder dependency is ~> 1.0 and have the sem version to limit < 2.0...

Copy link
Member

Choose a reason for hiding this comment

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

We assume Google not do evil things, libwebp only may changes API in 2.x, then 4.x would break, and users issue to us, we tell them how to fix them, list the libwebp version explicity or upgrade to 5.x, TBO, this is not good, from the view of project management, we need to prevent these things, in theory, my PR #2628 also needs to discuss, should we really trust libwebp would not happen very bad things like regressions until 2.0?

@KeymonWong
Copy link

😰

@dreampiggy
Copy link
Contributor Author

@KeymonWong Any issue about this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants