Skip to content

Conversation

mbrubeck
Copy link

@mbrubeck mbrubeck commented Nov 3, 2015

No description provided.

@mbrubeck
Copy link
Author

mbrubeck commented Nov 3, 2015

Depends on SSheldon/rust-objc-exception#1.

@SSheldon
Copy link
Owner

SSheldon commented Nov 5, 2015

Hey @mbrubeck, thanks for the pull request! It seems unfortunate to me that this will require the bump to 0.2 (meaning people need to start updating their Cargo files to get it) when nothing is really changing in objc.

I was thinking about going through all these libraries and changing the libc dependencies to >= 0.1, < 0.3, because they actually will work whether you want to use 0.1 or 0.2 with them, and then it seems to me like a backwards compatible update.

However, in testing that, I found that cargo just always uses libc 0.2 then, even if libc 0.1 is required by another dependency 😞 Is there really no way to make the Cargo file flexible and use whatever libc is already required?

@mbrubeck
Copy link
Author

mbrubeck commented Nov 5, 2015

As far as I can tell there's no way to make Cargo choose the same version by default for all dependencies if some dependencies can be satisfied by a newer but incompatible version. But if you do libc = ">= 0.1, < 0.3" then users with libc 0.1.x in their Cargo.lock can still build with your new version without updating libc. Users can also do cargo update -p libc --precise 0.1.12 to force-update their Cargo.lock.

@SSheldon
Copy link
Owner

SSheldon commented Nov 5, 2015

Oh interesting, yeah I can get it to all use the same version by using --precise.

Would you recommend against publishing a 0.1.8 with libc dependency updated to >= 0.1, < 0.3? Will that solve your issue? (I'm not sure it's completely backwards compatible, since it'll use libc 0.2 unless you upgrade with --precise, but at least then there is still a way to opt-out of it.)

Edit: oh an also this change would be made to malloc_buf and objc_exception as well so they can all start using libc 0.2.

@mbrubeck
Copy link
Author

mbrubeck commented Nov 5, 2015

Would you recommend against publishing a 0.1.8 with libc dependency updated to >= 0.1, < 0.3? Will that solve your issue?

That's fine with me, I think. Feel free to close this PR if you go with that option instead.

@SSheldon
Copy link
Owner

SSheldon commented Nov 6, 2015

Dependency was updated to allow either libc 0.1 or 0.2 in fbb62f8 and version 0.1.8 was published to crates.io. Thanks again for the pull request and talking this through with me, closing this one out!

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

Successfully merging this pull request may close these issues.

2 participants