SDWebImage / SDWebImageWebPCoder

A WebP coder plugin for SDWebImage, use libwebp
MIT License
217 stars 84 forks source link

Build Error with SDWebImage Version 5.18.0+ #84

Closed leeari95 closed 10 months ago

leeari95 commented 12 months ago

Currently, I'm managing project dependencies using Tuist.

Versions: macOS 13.5.2 Xcode 14.3.1 SDWebImage 5.18.2 SDWebImageWebPCoder 0.13.0

Build Error Details:

Include of non-modular header inside framework module 'SDWebImage': '/Users/AriLee/Developer/MyApp-iOS/Tuist/Dependencies/SwiftPackageManager/.build/checkouts/SDWebImage/SDWebImage/include/SDWebImage/SDWebImageCompat.h'

Upon direct testing, I found that the error mentioned above starts occurring from version 5.18.1 of SDWebImage. By locking the SDWebImage version to 5.18.0, the error no longer arises.

I'm not sure why this error is occurring due to the version difference. Please help.

dreampiggy commented 12 months ago

5.18.0 -> 5.18.1

Does not add new header files or source files...The tag diff is here: https://github.com/SDWebImage/SDWebImage/compare/5.18.0..5.18.1

The only change is Package.swift (SPM manifest file), which I bump the Swift version from 5.0->5.3

dreampiggy commented 12 months ago

How Tuist works on Swift Package Manager framework ? I have no knowledge about that.

dreampiggy commented 12 months ago

Guess this change cause the issue

// swift-tools-version:5.0 // swift-tools-version:5.3

But I don't know how the correct way to solve this. SDWebImage itself does not use any non-modular headers ? Always using #include "Foobar.h" inside public headers.

rishabh876 commented 10 months ago

Any update here? I am looking for a specific fix in version 5.18.1 of SDWebImage due to which images were showing upside down.

dreampiggy commented 10 months ago

I didn't see any error in SDWebImage's standard unit test on integration.

If you face issue, provide the reproduce demo, so that we can try to investigate.🤔️

Not the sample code, I mean a reproducible demo, like a zip archive or git repo

@rishabh876 Any demo ?

dreampiggy commented 10 months ago

Here is my test Demo, using Swift PM

SDWebImageSwiftPMObjc.zip SDWebImageSwiftPMSwift.zip

I didn't find anything integration issue.

Screenshot

截屏2023-11-20 20 55 36 截屏2023-11-20 20 56 18

Xcode Version

Xcode 14.3.1

rishabh876 commented 10 months ago

Ok it looks like I am also using 5.18.5 that should have the fix but still the images are getting upside down while encoding. It can be reproduce

dreampiggy commented 10 months ago

That fix is for JPEG only, not the WebP encoding. Maybe new bugs

dreampiggy commented 10 months ago

Can you create a new issue instead ? So I can create PR directly point to that. This PR seems out of date and non-related, I'll close now

dreampiggy commented 10 months ago

@rishabh876 Create a new issue with your demo ? I can not reproduce with the description you say.

For example

  1. I don't know how you say https://imgur.com/a/3WdWtZU, this is an PNG image, no EXIF orientation which effect the image orientation. And my encoding result to webp works great. You can provide the input image (to be encoded) zip archive to me
  2. Or, just provide a demo, using zip archive or git repo, with the full function
dreampiggy commented 10 months ago

The build issue no long exists and close