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

objc 0.2.7 dependency fails to build #6

Closed
aclysma opened this issue Nov 5, 2019 · 3 comments
Closed

objc 0.2.7 dependency fails to build #6

aclysma opened this issue Nov 5, 2019 · 3 comments

Comments

@aclysma
Copy link
Owner

aclysma commented Nov 5, 2019

The current workaround is to force cargo to use 0.2.6

cargo update -p objc --precise 0.2.6

@aclysma
Copy link
Owner Author

aclysma commented Nov 5, 2019

Found a better fix. Apparently specifying objc = "0.2.6" still permits upgrading to anything < 1.0.0. However a more explicit version requirement can be specified: objc = ">=0.2,<0.2.7"

This avoids users having to force updating to a particular version and for now builds out-of-the-box, but it may be worth asking the maintainer of objc if there is a better solution, and if this is a known problem.

@SSheldon
Copy link

@aclysma the metal-rs crate has been renamed to metal! The version of it and cocoa that you're using are a couple years old and unfortunately exercised the unsound behavior that is no longer allowed in objc 0.2.7, described in SSheldon/rust-objc#62.

If you switch to using the metal crate with a version 0.16 or higher (which accordingly uses cocoa 0.19), you will be able to use objc 0.2.7 and you'll be safe from this undefined behavior.

@aclysma
Copy link
Owner Author

aclysma commented Nov 19, 2019

Updated to use metal instead of metal-rs in a080e49 and this fixed the build problem. Thanks so much for the help!

@aclysma aclysma closed this as completed Nov 19, 2019
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

2 participants