brendanzab / gl-rs

An OpenGL function pointer loader for Rust
Apache License 2.0
679 stars 115 forks source link

khronos_api 1.1.0 breaks gfx_gl on macOS #434

Closed nominolo closed 7 years ago

nominolo commented 7 years ago

When I installed ggez v0.3.3 today (5 Nov 2017) it failed to build gfx_gl v0.3.1:

error: failed to run custom build command for `gfx_gl v0.3.1`
process didn't exit successfully: `/Users/nominolo/code/my/ggez-games/robot-game/target/release/build/gfx_gl-1832a9a63c3e6763/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Type conversion not implemented for `GLeglClientBufferEXT`', /Users/nominolo/.cargo/registry/src/github.com-1ecc6299db9ec823/gl_generator-0.5.5/registry/parse.rs:979:13

Since this was working a week ago I compared the Cargo.lock files and khronos_api was the most likely candidate, so I tried downgrading to v1.0.1 which fixed the issue. So I assume that was indeed the issue.

I don't know if this is a macOS-specific issue. To reproduce, just create cargo --bin new and add this to your Cargo.toml:

[dependencies.ggez]
version = "0.3"

My current work-around is to just add:

[dependencies]
khronos_api = "1.0.*"

Attached Cargo.lock files (I needed to add .txt to make Github happy). Cargo.lock.borken.txt Cargo.lock.txt

nominolo commented 7 years ago

Oh, it's maybe worth mentioning that gfx_gl v0.3.1 uses:

[[package]]
name = "gfx_gl"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "gl_generator 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
msiglreith commented 7 years ago

khronos_api should have been bumped from 1.0.1 to 2.0.0 because the 1.0.1 and 1.1.0 are compatible (http://doc.crates.io/specifying-dependencies.html#caret-requirements). The gl_generator dependency should be also changed to ~2.0 to avoid future sem ver issues imo.

tomaka commented 7 years ago

It's more that gl_generator should have a dependency on khronos_api <= 1.0 so that 1.1 wouldn't get picked.

brendanzab commented 7 years ago

Oh fun. Should we yank 1.1.0 then?

brendanzab commented 7 years ago

Ok, I've yanked the following crates:

We'll need to publish a new version of khronos_api with the major version bumped.

brendanzab commented 7 years ago

A reminder that yanking these versions will still allow the previously applied hacks to continue to work, but will ensure that future folks don't run into the same problem!

tomaka commented 7 years ago

There was no need to yank these crates. Gl_generator 0.6 actually contains the fix for the problem.

tomaka commented 7 years ago

Khronos_api 1.1 was correct as well.

brendanzab commented 7 years ago

Oh yeah - if I just yanked khronos_api it would have been fine. Still would have needed to bump the versions to khronos_api = 2.0.0 though, and would have needed to republish. 🤔 Well - it's done now!