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

request: make iced_aw work with the latest iced #25

Closed
DavidBJaffe opened this issue Jun 19, 2021 · 42 comments
Closed

request: make iced_aw work with the latest iced #25

DavidBJaffe opened this issue Jun 19, 2021 · 42 comments

Comments

@DavidBJaffe
Copy link

It would be wonderful if one could use the master versions of both iced and iced_aw. As best I can tell, this is not currently possible, because iced_aw uses the crates.io versions of iced crates, and this leads to two different versions of the same iced crate in use at the same time, which won't compile.

In principle this might be enabled by iced_aw specifying iced crates using the general form

iced... = { git = "https://github.com/hecrj/iced", version = "..." }

I started a PR to do this, but ran into issues with the use of Padding. I could try to fix this, but am not sure I'd be making the correct changes.

@genusistimelord
Copy link
Collaborator

I currently have a version which works with the latest git release of Iced.

https://github.com/genusistimelord/iced_aw/tree/iced-main

feel free to use it. I am ATM just waiting for them to accept my current patch's before i ask to add a Iced_main branch to the list of branches.

@Kaiden42
Copy link
Collaborator

Since I encountered the similar problem myself today, I think it's a good idea to support the current version as well. However, I still have two concerns about this:

  • Possibly this could lead to a split of this repository. For example, the question would arise for which version new widgets should be implemented. For the stable release of iced or for the latest HEAD.

  • It could end in a race. If iced would receive a new commit, you would have to catch up with this commit to get back to the latest state.

How do you see this?

@genusistimelord
Copy link
Collaborator

genusistimelord commented Jun 21, 2021

I see that we can set it to a set Repository Version that way we update to their next commits when we see that it will work without any changes. but if changes are needed we don't need to switch to the latest till they are implemented. It is good to have something even if its not fully caught up. Since its further ahead than sticking to stable so it will allow people to make more widgets that might only be made with a newer versions of iced.

I don't Expect it to stay at the latest Version at all times but at least have a chance to get there.

@DavidBJaffe
Copy link
Author

Can you please specify the Cargo.toml entries that you use to get the latest iced and iced_aw?

@genusistimelord
Copy link
Collaborator

for now just add

iced = { git = "https://github.com/genusistimelord/iced.git", features = ["canvas", "tokio", "image", "debug", "wgpu"] }
iced_aw = { git = "https://github.com/genusistimelord/iced_aw.git", branch = "iced-main", default-features = false, features = ["number_input", "color_picker", "colors"] }

this will give you the ability to use the last updated iced with iced_aw with all my updates to fix some known issues.

I will need to work out something with @Kaiden42 to see if we can start a beta branch for the latest Iced Git.

@Kaiden42
Copy link
Collaborator

I see that we can set it to a set Repository Version that way we update to their next commits when we see that it will work without any changes. but if changes are needed we don't need to switch to the latest till they are implemented. It is good to have something even if its not fully caught up. Since its further ahead than sticking to stable so it will allow people to make more widgets that might only be made with a newer versions of iced.

I don't Expect it to stay at the latest Version at all times but at least have a chance to get there.

Thanks for the clarification and I totally agree with you. I've now created a new beta branch from the current main.

I will need to work out something with @Kaiden42 to see if we can start a beta branch for the latest Iced Git.

Do you have a suggestion on how we can best address this issue?

@genusistimelord
Copy link
Collaborator

Making a Beta branch probably is a good start towards integrating the latest versions. I Will pull down all my changes from my branch and update them to this new Beta Branch. This way we can be caught up to the current Iced. Thank you for taking the time to Add the Beta Branch! Also if you are not too busy you can probably add me on Telegram: @genusis or Discord: Genusis#1548.

@genusistimelord genusistimelord mentioned this issue Jul 1, 2021
Merged
@genusistimelord
Copy link
Collaborator

genusistimelord commented Jul 14, 2021

Beta Branch will be updated soon once I am able to add any finishing Touches to my Selection List changes.

@genusistimelord
Copy link
Collaborator

Beta is now to the latest of Iced as of today.

@kaimast
Copy link

kaimast commented Feb 5, 2022

Seems like beta stopped working on latest iced again...

@genusistimelord
Copy link
Collaborator

genusistimelord commented Feb 5, 2022

yeah ill have to update it again to the latest. they made a ton of breaking changes for iced 4.0 though XD.

@kaimast
Copy link

kaimast commented Feb 5, 2022

Yup... I tried to do it last night but it was much harder than I thought (to be fair I don't know the iced or iced_aw codebase that well).

iced_web also got removed completely so that changes a bunch of things.

@genusistimelord
Copy link
Collaborator

iced_web got moved to its own Repo. the others I need to see what they replaced the current things with and update accordingly Might need some help from either @hecrj and/or @Kaiden42

@Kaiden42
Copy link
Collaborator

Kaiden42 commented Feb 6, 2022

Coming week I can take a look at adapting iced_aw back to the latest version of iced.

@genusistimelord
Copy link
Collaborator

I can help change things over too just I have no idea what changes were made yet and as to why. If need be we can open a new branch based on beta to make the changes in. that way we will be ahead of the game when iced v0.4 is released.

@Kaiden42
Copy link
Collaborator

Kaiden42 commented Feb 9, 2022

Alright, I now have a rough overview of the breaking changes that need to be fixed and I've opened up a PR (#46). The moving of iced_web into it's own repository seems to be our smallest problem.

The bigger breaking change is how a widget is rendered. A widget doesn't have it's own rendering trait anymore. The renderer implementation is now directly implemented into the draw method of the widget. Therefore the struct DrawEnvironment isn't necessary anymore as it's only purpose was to reduce the number of arguments of the renderer trait's function to satisfy clippy.

In addition the draw function does not return a value anymore. The drawing is directly done using the drawing functions of the iced_native::Renderer (or iced_native::text::Renderer for text).

My plan is as following:

  1. Starting with all "normal" widgets and fix all occurring compiler errors by taking it to the newer rendering strategy
  2. Continuing with all "overlay" widgets (should be the same as with the "normal" widgets but I haven't tried it yet)
  3. When the project successfully compiles again, implement the new mouse_interaction method of the Widget trait and find out how to do a clip with the new kind of renderer (eg. for the Split widget).
  4. Verify that everything works like before

I am currently at step one and have (hopefully) finished the widgets: Badge, Card, Grid, IconText, NumberInput and Split

The "normal" widgets that are left are: Tab, TabBar and Wrap.

@genusistimelord If you like, you could take a look at the TabBar and Tabs widget. They should be as easy as the widgets that are already done. I recommend looking at the Badge and Card widgets to understand what needs to be done. The Wrap widget could be a little bit tricky.

Tomorrow I will take a look at step 2 of my plan.

@genusistimelord
Copy link
Collaborator

OK I will take a look at the changes you did to Badge and Card and implement them into TabBar and Tabs tomorrow. If I complete them or if I have any issues I will let you know ASAP. Also is there any Discord/Telegram or some sort of chat type system other than here I can get a hold of you at?

@Kaiden42
Copy link
Collaborator

Kaiden42 commented Feb 9, 2022

OK I will take a look at the changes you did to Badge and Card and implement them into TabBar and Tabs tomorrow.

Great! Thank you very much.

If I complete them or if I have any issues I will let you know ASAP. Also is there any Discord/Telegram or some sort of chat type system other than here I can get a hold of you at?

I've send you a friend request on discord.

@Kaiden42
Copy link
Collaborator

The transition is now complete #46 ! Thanks to @genusistimelord for helping me out with this!

However the web build is currently broken (see: this issue)

@kaimast
Copy link

kaimast commented Feb 16, 2022

This is great. Thanks so much!

One more thing considering is to move from hecrj/iced to iced-rs/iced.

@genusistimelord
Copy link
Collaborator

Yeah we forgot about that when we were quickly updating everything. Though we do still have issues with iced-web since this has not been updated yet....

@genusistimelord
Copy link
Collaborator

I have made another update to beta to support the newest iced release 0.4. We will need to discuss how we plan to add in pure widgets to iced_aw @Kaiden42. I am thinking we have 2 ways we can go about this either A drop all impure widgets and support pure only since iced supports pure with impure or separate and clone each widget into a new folder called pure and make pure versions of each. I also set the Cargo.toml so it will be easier to switch between full releases and git repo's.

We should split the web stuff into iced_web_aw and no longer have web inside iced_aw which will make it easier to keep iced_aw updated.

@m00nwtchr
Copy link

m00nwtchr commented Sep 27, 2022

Looks like iced removed impure widgets on master, would be nice to have an updated beta branch for iced_aw.

@genusistimelord
Copy link
Collaborator

yeah I can start Getting beta changed over to using Pure only for Main. Probably will Start Tomorrow.

@paulcomte
Copy link

update ?

@genusistimelord
Copy link
Collaborator

it should work with Iced 0.5.2. Just @Kaiden42 has not released a new version on crates for it yet. if you want iced master we have not done any newer stuff yet.

@paulcomte
Copy link

I've tried making it work with the latest version of iced (0.5.2) using the main branch, but when creating a color_picker the compiler says that two versions of the crate iced might be in use.

color_picker points to iced_core::color::Color whereas I have only iced::Color,

@genusistimelord
Copy link
Collaborator

you wont be able to use Iced's github main branch with the current git here. ATM this is only for iced on crates.io. We have not updated to any new git changes for iced main yet.

@kaimast
Copy link

kaimast commented Dec 5, 2022

I've tried making it work with the latest version of iced (0.5.2) using the main branch, but when creating a color_picker the compiler says that two versions of the crate iced might be in use.

This probably won't work in this specific case, but in general if you get an error like this you would need to override the dependencies of the crate importing the "wrong" version like it is described here.

@genusistimelord
Copy link
Collaborator

It might work unless there have been some major changes in main that need to be added.

@GyulyVGC
Copy link

It'd be awesome to have a new version of iced_aw released on crates.io, to be compatible with iced 0.6.

@genusistimelord
Copy link
Collaborator

I would love to do it but I have no powers to do that =[ only @Kaiden42 does.

@GyulyVGC
Copy link

GyulyVGC commented Jan 4, 2023

I would love to do it but I have no powers to do that =[ only @Kaiden42 does.

And is there any particular reason this is not happening? Could I be of any help?

@genusistimelord
Copy link
Collaborator

sadly @Kaiden42 has the only permissions for pushing changes to iced_aw on crates.io. Any change I make myself must be approved by @Kaiden42. I only have powers enough to approve and merge PR's that are not my own.

@GyulyVGC
Copy link

GyulyVGC commented Jan 4, 2023

I got it, I was just wondering the particular reason for him to not having published a new version yet.
Maybe it's just a matter of time, thank you very much for your answers!

@paulcomte
Copy link

Since we have no response, should we make a fork and use the git feature of Cargo until the owner comes back ?

@genusistimelord
Copy link
Collaborator

IF you submit a PR with fixes I can pull it into the repo. just with him gone we can not get the crates package updated.

@Kaiden42
Copy link
Collaborator

Hello everyone. I have decided to take a step back from the online world, and the developement of open source projects and take some time for myself to reduce stress and recharge my batteries. As a result, I will be continuing to retire, and I decided to handing over the ownership of the Crate to @genusistimelord. I apologize for any delays that I may have caused. Thank you for your understanding and your support for this project.

@GyulyVGC
Copy link

Hello everyone. I have decided to take a step back from the online world, and the developement of open source projects and take some time for myself to reduce stress and recharge my batteries. As a result, I will be continuing to retire, and I decided to handing over the ownership of the Crate to @genusistimelord. I apologize for any delays that I may have caused. Thank you for your understanding and your support for this project.

Don't worry and good luck with your life!

@genusistimelord
Copy link
Collaborator

I will try to get a updated Crate out soon.

@paulcomte
Copy link

Hello everyone. I have decided to take a step back from the online world, and the developement of open source projects and take some time for myself to reduce stress and recharge my batteries. As a result, I will be continuing to retire, and I decided to handing over the ownership of the Crate to @genusistimelord. I apologize for any delays that I may have caused. Thank you for your understanding and your support for this project.

No problem bud !
Thanks a lot for the work you did, good luck with your life, hopefully all of your dreams will come true !!
<3

@genusistimelord
Copy link
Collaborator

I am going to close this issue since we do upkeep with the latest Current Iced version on crates.io. Any other iced will need to be done when it is stabilized more from here on out. Will repush a Beta branch for dealing with iced main. the changes however have been very dramatic though.

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

7 participants