Closed luca992 closed 1 year ago
still need rework findFetcherFor and findDecoderFor to work properly on native.... but I got it running on a macosArm64 native application 🎉
cool thing to note. The compose-ui native sample app is way smoother and kamel loads images faster on mac vs jvm
https://user-images.githubusercontent.com/4157455/183836880-b87527f7-e55f-4de4-b264-1cbfb3c3494b.mov
Added support for web!
Basically what needs to be implemented still for the new targets:
PS. I think I can technically remove the full reflection dependency on jvm now. But, I have left it alone for now until I can get some feedback on that @alialbaali
also you can try it out here:
implementation("io.github.luca992.com.alialbaali.kamel:kamel-image:0.5-darwinandjs1")
You've done a fantastic work. I'm very impressed! Thank you for your contribution, and it's really appreciated 🚀.
I reviewed the code and it looks good to me. You can go ahead and finish the rest.
hello all!
Let me start by saying: excellent job @luca992! This is no easy task and you're getting there 🙌.
I'm trying to validate this on a side project, but I'm having a crash when loading an image both locally and remotely on the iOS simulator. I'm using Kotlin 1.7.10 and Compose beta02.
Not sure if these logs help though:
4 Unsplash 0x104f7ae79 konan::abort() + 9
5 Unsplash 0x104f8afe1 (anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1::operator()() const + 17
6 Unsplash 0x104f8aecf void (anonymous namespace)::$_0::operator()<(anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1>((anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1) + 47
7 Unsplash 0x104f8acfd (anonymous namespace)::terminateWithUnhandledException(ObjHeader*) + 45
8 Unsplash 0x104f8ac9b (anonymous namespace)::processUnhandledException(ObjHeader*) + 91
9 Unsplash 0x1044d9578 kfun:kotlinx.coroutines#handleCoroutineExceptionImpl(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 72
@cmota Thanks! It's getting there. I haven't tried iOS simulator yet. I'll check it out. I've tested the build on an ios device and it was working however. are you haveing problems with the mac sample too?
I think I've understood the issue, well at least what's causing it! The problem seems to be related with moko-resources.
Did you have any issues when you made your sample?
I've removed its references and now I'm able to load remote images! 🙌
On a side note, I also noticed that I'm not able to load VectorResource
.
@cmota oh looks like I didn't even enable ios targets for the samples module. So don't think I tried running it there.
If I had to guess you're running into this issue on ios https://github.com/icerockdev/moko-resources/issues/362
On a side note, I also noticed that I'm not able to load
VectorResource
.
@cmota yeah see my notes on what still needs to be done.
@luca992, yup, I've add the targets manually 🙂.
I'm unable to get a stacktrace as good as that one, though. Is there any trick to it?
@cmota I added an ios sample... however I can't get the gradle deploy to simulator command to work.
I had to open the generated xcode project and change a setting:
and to get load from file example working you have to manually add the bundle:
I managed to get it working without the xcode project, but it would randomly crash.
I'm going to try to see if I can push the project before the end of this week so you could see.
Huh really. Yeah I would be interested to see how you got it going by command to simulator. And if you have anything different in your setup than what I just pushed. I think native desktop has a random crashing issues too. But that just might be a compose-jb issue. Not sure
Is there a way I can test this on iOS?
Is there a way I can test this on iOS?
yeah. here https://github.com/alialbaali/Kamel/pull/23#issuecomment-1245765234
A new kotlin 1.8.20 and compose 1.4.0 build
implementation("io.github.luca992.com.alialbaali.kamel:kamel-image:0.5-darwinandjs2")
Managed to get svg decoder working on native 🙌
A new kotlin 1.8.20 and compose 1.4.0 build
implementation("io.github.luca992.com.alialbaali.kamel:kamel-image:0.5-darwinandjs2")
I am trying to implement it on my project but Gradle keeps tell me that
Could not find io.github.luca992.com.alialbaali.kamel:kamel-image:0.5-darwinandjs2.
any ideas?
@qamarelsafadi oh oops. I forgot to click release. should be up in a few
published a release with SvgDecoder for nonJvm:
implementation("io.github.luca992.com.alialbaali.kamel:kamel-image:0.5-darwinandjs3")
Got ImageVectorDecoder working on native/js and decoding xmls with https://github.com/pdvrieze/xmlutil
@alialbaali finished everything I wanted to do 🎉. I know you said you gave me permission to merge. But did you want to take a look first?
Astonishing work you've done there! Thank you, really appreciated! 🎉🎉🎉
I don't have any issues at all, just a couple of things:
lazyPainterResource
, because I don't think "lazy" means what it means in this context or function. It's been bugging me for a while 🥲I personally don't mind, so please let me know your thoughts. 🙂
@alialbaali
Honestly a lot of the names confuse me in general so I just didn't think about it and accepted it for what it was haha. You probably are right.
Really? Publishing has been working fine for me. I might have fixed some bugs though along the way. So maybe it will work as it should now for you as well. I just published again here with the latest:
implementation("io.github.luca992.com.alialbaali.kamel:kamel-image:0.5-darwinandjs4")
Makes sense, haha 🥲. Feel free to change the names to whatever suitable maybe in another PR, or discussion. Even the name of the repository if you have something better in mind 😝
Well, that's good to hear!
The thing is, I don't prefer to keep publishing under my name when I'm not really doing any of the work right now. It seems unfair. So, I'm thinking of moving this repo to an organization, buy a domain name, and publish it under that domain. Maybe something like media.kamel:kamel-image:1.0.0
. What do you think?
3. The thing is, I don't prefer to keep publishing under my name when I'm not really doing any of the work right now. It seems unfair. So, I'm thinking of moving this repo to an organization, buy a domain name, and publish it under that domain. Maybe something like `media.kamel:kamel-image:1.0.0`. What do you think?
that works 👍
Alright then.
Do you want to stick with the name Kamel? If so, what domain would you like us use?
So far, I found these two:
I'd probably choose media if it were me. But your choice haha. And I think kamel is a solid name
Alright. So, I got the domain, and the repository has been transferred to an organization.
I'm guessing we're going to keep publishing on Maven Central, correct? If so, I think we might need a separate Sonatype Jira account where we can share the credentials? Or is it possible to invite someone to the project?
Any thoughts @luca992?
Alright. So, I got the domain, and the repository has been transferred to an organization.
I'm guessing we're going to keep publishing on Maven Central, correct? If so, I think we might need a separate Sonatype Jira account where we can share the credentials? Or is it possible to invite someone to the project?
I don't think there's really any other viable option besides Maven Central anymore. And if you want to share credentials that's fine. You could make a bitwarden organization if you wanted to do that. But there's no way there's not a way to give multiple accounts permission to release to maven central for an organization.... however I have no idea how that works. Sonatype Jira is so confusing 🙃 maybe you can ask in the same ticket you use to create the new repository?
I just need your Sonatype username, so I can let you publish artifacts. @luca992
Alright, I messaged you.
Thank you guys for this great library! Curious if there is significant change in the usage/documentation?
This is a draft and not finished yet. But, I have begun adding support for iOS, macOS, and js targets!