-
Notifications
You must be signed in to change notification settings - Fork 3
Example only compiles with stored Cargo.lock #3
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
Comments
I think the versions should be compatible. This repo uses gtk4-rs 0.6 which depends on cairo-rs 0.17 which is the same version that the plotters-cairo backend uses. @sdroege do you have an idea why this is happening? Also, I think we should update to gtk4-rs 0.7 and cairo-rs 0.18 soon anyway, but I don't know if that solves the problem. |
The versions need to be in sync, yes. How can I reproduce the problem reported here? Updating to the latest versions should also happen but I'm quite busy right now so if someone else has time to look into that... |
"How can I reproduce the problem reported here?" Sorry I wasn't explicit: I get a different error now (see below), but the procedure is the same:
It works if I: (I repeated this with a clean repo clone for sanity) Can either of you reproduce that? Maybe it's my error. . One thing looked strange during the failed run- there are two (different?) compiled versions of plotters-backend listed if that's relevant |
Yes there was an API change in plotters and different versions of the crate are pulled in currently. That would have to be fixed. I don't know what the plan here is. plotters, plotters-cairo and this all have to point to consistent versions of everything. Something for @AaronErhardt to decide (e.g. should everything always point to git of plotters related crates? latest releases?) I also get this error but that's different from the original error you reported though ( |
When I clone and run the example, it compiles and works, really cool!
If I move all the code to a new project with the same sources and Cargo.toml, the build generates an error at line 62 in src/gaussian_plot/imp.rs:
expected
cairo::context::Context
, foundgtk4::cairo::Context
It looks like this might be similar to this stackoverflow issue which was solved by resolving the dependency conflict between versions of cairo-rs in gtk4 and plotters-cairo:
https://stackoverflow.com/questions/75229974/how-do-i-fix-my-compatability-errors-when-using-plotterscairobackend-with-gtk
I get very similar compiler notes after the error, with two versions of cairo-rs showing up.
What is an appropriate resolution for this? To specify versions of gtk, plotters and plotters-cairo in the repository's .toml file?
The text was updated successfully, but these errors were encountered: