-
Notifications
You must be signed in to change notification settings - Fork 295
Why are glium/winit/etc no longer re-exported? #1284
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
Thanks for the suggestion, do you have a recommended way of going about doing this?
You can read more about the reasons behind the refactor away from features towards backend crates at #1223. You can also read more about why winit is no longer re-exported at #1262. W.r.t. keeping up with versions, I understand your pain, but I hope you can understand how difficult this has been to maintain in conrod. As a result of re-exporting winit, I had to also ensure that the gfx, glium and vulkano backends were all compatible with whatever the latest version of winit was before I could ever update winit. This frequently meant I would have to go to those repositories, contribute the necessary breaking changes, wait days for them to merge the PR and wait even longer for them to publish a release in the hope that eventually each of the backends would sync up. I already have very little time to maintain conrod - #1223 and #1262 have been essential for me to maintain the ability to update each backend as necessary without also having to try and synchronize them all upstream myself. I hope this and the linked PRs helped to explain the motivation behind these changes! Feel free to re-open this issue if you feel this hasn't been properly addressed! |
First, thanks a lot for all the work on conrod. It's a great contribution to the rust ecosystem, and a great experiment with the immediate vs retained mix.
My guess would be to just push a 0.61.2
I've read the references but am missing something about the problem. My current issue is that my
The glium and winit dependencies were specified to be the same as what's in conrod_glium and conrod_winit. If they're not the compile fails. For example if I update winit to 0.19 I get this:
(see the hint about two different versions of the crate). This is even brittle as I suppose a 0.65 point release could update winit/glium and break the build. All I want to do is in the code write "use whatever glium/winit conrod has already pulled in". Is there really extra maintenance in just reexporting winit in |
As another example, to update to conrod 0.66 my diff is: diff --git a/Cargo.toml b/Cargo.toml
index 7399f59..fd2dd02 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,11 +12,11 @@ categories = ["multimedia::images"]
image = "0.21"
rand = "0.6"
crossbeam-utils = "0.6"
-conrod_core = "0.65"
-conrod_glium = "0.65"
-conrod_winit = "0.65"
-glium = "0.23"
-winit = "0.18"
+conrod_core = "0.66"
+conrod_glium = "0.66"
+conrod_winit = "0.66"
+glium = "0.24"
+winit = "0.19" This required figuring out 0.24 and 0.19 were the correct glium/winit versions before it would compile again. |
Yes, because users who require using a different version of I will accept a PR to have Again, I'm sorry that you have to check the compatible versions for |
I guess what was unclear to me was what was actually bringing in winit as a dependency from conrod. Right now depending on conrod_core+conrod_glium+conrod_winit brings in a winit version that will then be incompatible with other versions. If that didn't happen the current design would make more sense to me as you could use any version of winit you wanted. Looking into it it seems what's happening is conrod_glium->glium->glutin->winit.
If glium was reexported, and if glium would then reexport winit, this would fix it. And the other backends could do the same I suppose. If their dependencies bring in winit they could reexport those. I don't think this happens generally though so there's not much point. Maybe cargo needs a way to specificy a dependency versioned as "whatever crate X has already dragged in".
Don't worry about this at all. I only discussed this to try and help. If it does indeed bring an extra burden by all means just keep it as is. One day when the ecosystem is much more stable this won't be a problem. |
Having gone through the (reasonably simple) work of going from conrod 0.61 and 0.65 with the new packaging setup here are a couple of notes.
First it may make sense to add a warning to the
conrod
crate explaining that it's no longer to be used. I was convinced I was using the latest conrod until I realized the crate names had changed.Second, the previous packaging allowed for things like:
which means I only needed to depend on conrod and then ended up using whichever glium and winit versions it depended on. Now I need to depend on glium and winit explicitely and when the versions don't match the compile fails. So I'm still limited to using whichever glium/winit versions conrod is depending on but now I need to figure out what those are to specify them explicitly to cargo. Is there a better way to do this instead?
The text was updated successfully, but these errors were encountered: