Skip to content

Build Error with SDWebImage Version 5.18.0+ #84

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

Closed
leeari95 opened this issue Sep 22, 2023 · 11 comments
Closed

Build Error with SDWebImage Version 5.18.0+ #84

leeari95 opened this issue Sep 22, 2023 · 11 comments

Comments

@leeari95
Copy link

leeari95 commented Sep 22, 2023

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
Copy link
Contributor

dreampiggy commented Sep 22, 2023

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
Copy link
Contributor

dreampiggy commented Sep 22, 2023

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

@dreampiggy
Copy link
Contributor

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
Copy link

rishabh876 commented Nov 20, 2023

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
Copy link
Contributor

dreampiggy commented Nov 20, 2023

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
Copy link
Contributor

dreampiggy commented Nov 20, 2023

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
Copy link

rishabh876 commented Nov 20, 2023

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

  • Use Simulator with iOS 17.0 and pick the sample image in Simulator with the pink flowers. https://imgur.com/a/3WdWtZU
  • Encode imageSDImageWebPCoder.shared.encodedData(with: image, format: .webP, options: [.encodeCompressionQuality: 0.8, .encodeMaxFileSize: 1024 * 1024])
  • The produced image comes upside down

@dreampiggy
Copy link
Contributor

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

@dreampiggy
Copy link
Contributor

dreampiggy commented Nov 20, 2023

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
Copy link
Contributor

dreampiggy commented Nov 21, 2023

@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
Copy link
Contributor

The build issue no long exists and close

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

No branches or pull requests

3 participants