Bombfuse / emerald

A 2D rust game engine focused on portability.
MIT License
558 stars 16 forks source link

Dependency conflict #201

Closed coldloaded closed 1 year ago

coldloaded commented 1 year ago

Two versions of nix are causing this conflict, I guess

... Compiling nix v0.23.1 Compiling nix v0.24.2 ... Compiling minimp3 v0.5.1 error[E0308]: mismatched types --> /home/pc/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.5/src/host/alsa/mod.rs:245:21 244 let handle = match handle_result { ------------- this expression has type std::result::Result<host::alsa::alsa::PCM, (host::alsa::alsa::Error, host::alsa::alsa::nix::errno::Errno)> 245 Err((_, nix::errno::Errno::EBUSY)) => return Err(BuildStreamError::DeviceNotAvailable), ^^^^^^^^^^^^^^^^^^^^^^^^ expected enum host::alsa::alsa::nix::errno::Errno, found enum nix::errno::Errno
= note: perhaps two different versions of crate `nix` are being used?
error[E0308]: mismatched types --> /home/pc/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.5/src/host/alsa/mod.rs:246:21 244 let handle = match handle_result { ------------- this expression has type std::result::Result<host::alsa::alsa::PCM, (host::alsa::alsa::Error, host::alsa::alsa::nix::errno::Errno)> 245 Err((_, nix::errno::Errno::EBUSY)) => return Err(BuildStreamError::DeviceNotAvailable), 246 Err((_, nix::errno::Errno::EINVAL)) => return Err(BuildStreamError::InvalidArgument), ^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum host::alsa::alsa::nix::errno::Errno, found enum nix::errno::Errno
= note: perhaps two different versions of crate `nix` are being used?
error[E0308]: mismatched types --> /home/pc/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.5/src/host/alsa/mod.rs:302:21 301 let handle = match handle_result { ------------- this expression has type std::result::Result<&mut host::alsa::alsa::PCM, (host::alsa::alsa::Error, host::alsa::alsa::nix::errno::Errno)> 302 Err((_, nix::errno::Errno::ENOENT)) Err((_, nix::errno::Errno::EBUSY)) => { ^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum host::alsa::alsa::nix::errno::Errno, found enum nix::errno::Errno
= note: perhaps two different versions of crate `nix` are being used?
error[E0308]: mismatched types --> /home/pc/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.5/src/host/alsa/mod.rs:302:59 301 let handle = match handle_result { ------------- this expression has type std::result::Result<&mut host::alsa::alsa::PCM, (host::alsa::alsa::Error, host::alsa::alsa::nix::errno::Errno)> 302 Err((_, nix::errno::Errno::ENOENT)) Err((_, nix::errno::Errno::EBUSY)) => { ^^^^^^^^^^^^^^^^^^^^^^^^ expected enum host::alsa::alsa::nix::errno::Errno, found enum nix::errno::Errno
= note: perhaps two different versions of crate `nix` are being used?
error[E0308]: mismatched types --> /home/pc/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.5/src/host/alsa/mod.rs:305:21 301 let handle = match handle_result { ------------- this expression has type std::result::Result<&mut host::alsa::alsa::PCM, (host::alsa::alsa::Error, host::alsa::alsa::nix::errno::Errno)> ... 305 Err((_, nix::errno::Errno::EINVAL)) => { ^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum host::alsa::alsa::nix::errno::Errno, found enum nix::errno::Errno
= note: perhaps two different versions of crate `nix` are being used?
error[E0308]: mismatched types --> /home/pc/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.5/src/host/alsa/mod.rs:720:36 720 Err(err) if err.errno() == nix::errno::Errno::EPIPE => { ^^^^^^^^^^^^^^^^^^^^^^^^ expected enum host::alsa::alsa::nix::errno::Errno, found enum nix::errno::Errno
= note: perhaps two different versions of crate `nix` are being used?
Compiling nalgebra v0.31.2 error[E0308]: mismatched types --> /home/pc/.cargo/registry/src/github.com-1ecc6299db9ec823/cpal-0.13.5/src/host/alsa/mod.rs:803:40 803 Err(err) if err.errno() == nix::errno::Errno::EPIPE => { ^^^^^^^^^^^^^^^^^^^^^^^^ expected enum host::alsa::alsa::nix::errno::Errno, found enum nix::errno::Errno
= note: perhaps two different versions of crate `nix` are being used?

For more information about this error, try rustc --explain E0308. error: could not compile cpal due to 7 previous errors warning: build failed, waiting for other jobs to finish...

Bombfuse commented 1 year ago

It looks like there's a version mismatch in dependencies, I'll try resolving this. I'm not sure how this made it through the github actions tests 🤔

Bombfuse commented 1 year ago

Seems like both are sub-dependencies of kira. I don't think that we can fix this immediately, I'll need to include a Kira version update in the next big PR as part of the WGPU branch image

Bombfuse commented 1 year ago

Seems like this issue is triggering on the kira repo as well, I'm not sure what would cause this to break as it was working before.

https://github.com/tesselode/kira/actions/runs/3305051369/jobs/5454870747

Bombfuse commented 1 year ago

confirmed upgrading our kira version will fix the issue, I should be able to do this after the WGPU migration is finished.

https://github.com/tesselode/kira/releases/tag/v0.7.1

coldloaded commented 1 year ago

Thank you

Bombfuse commented 1 year ago

hey @coldloaded I haven't updated Kira yet, however the WGPU branch has been merged into master.

I tried WSL Ubuntu and I'm able to build successfully now, can you confirm on your end if the problem is resolved?

coldloaded commented 1 year ago

yeah problem solved