17cupsofcoffee / tetra

🎮 A simple 2D game framework written in Rust
MIT License
907 stars 63 forks source link

Tetra fails to build with edition = "2021" or resolver = "2" #294

Closed 17cupsofcoffee closed 2 years ago

17cupsofcoffee commented 2 years ago

Summary

The old version of cpal that Tetra currently depends on fails to build with edition = "2021" or resolver = "2" in the Cargo.toml.

I'm not 100% sure why, but it seems like that version of cpal uses the errhandlingapi feature without actually enabling it (perhaps it's getting enabled via a conditional dependency or a dev dependency). This appears to be fixed in cpal 0.12 and up, but we can't upgrade without doing a breaking change to Tetra.

Workaround

Add this to your Cargo.toml, in the [package] section:

resolver = "1"

I have confirmed on one of my own projects that this resolves the issue.

Actual Fix

Long term, the fix will be to upgrade cpal, but in the meantime we may be able to get away with adding a winapi dependency to Tetra itself.

Steps to Reproduce

Additional Info

No response

17cupsofcoffee commented 2 years ago

Fixed on main.

17cupsofcoffee commented 2 years ago

And fixed in 0.6.7 :)