ggez / good-web-game

An alternative ggez implementation on top of miniquad.
MIT License
332 stars 30 forks source link

Versioning issues while compiling for android #64

Closed Pavel-N closed 2 years ago

Pavel-N commented 2 years ago

So Im trying to compile for android using comand

sudo docker run --rm -v <path to my project>:/root/src -w /root/src notfl3/cargo-apk cargo quad-apk build    

I cant compile good-web-game as seen down below,

 Compiling good-web-game v0.4.0
error[E0433]: failed to resolve: could not find `Cache` in `conf`
  --> /home/pavel/.cargo/registry/src/github.com-1ecc6299db9ec823/good-web-game-0.4.0/src/conf.rs:31:40
   |
31 |                 cache: miniquad::conf::Cache::No,
   |                                        ^^^^^ could not find `Cache` in `conf`

error[E0433]: failed to resolve: could not find `Cache` in `conf`
  --> /home/pavel/.cargo/registry/src/github.com-1ecc6299db9ec823/good-web-game-0.4.0/src/filesystem.rs:28:32
   |
28 |         if let miniquad::conf::Cache::Tar(tar_file) = conf.quad_conf.cache {
   |                                ^^^^^ could not find `Cache` in `conf`

error[E0412]: cannot find type `Cache` in module `miniquad::conf`
  --> /home/pavel/.cargo/registry/src/github.com-1ecc6299db9ec823/good-web-game-0.4.0/src/conf.rs:62:49
   |
62 |     pub fn cache(mut self, val: miniquad::conf::Cache) -> Self {
   |                                                 ^^^^^ not found in `miniquad::conf`

error[E0560]: struct `miniquad::conf::Conf` has no field named `cache`
  --> /home/pavel/.cargo/registry/src/github.com-1ecc6299db9ec823/good-web-game-0.4.0/src/conf.rs:31:17
   |
31 |                 cache: miniquad::conf::Cache::No,
   |                 ^^^^^ `miniquad::conf::Conf` does not have this field
   |
   = note: available fields are: `window_title`, `window_width`, `window_height`, `high_dpi`, `fullscreen` ... and 3 others

error[E0609]: no field `cache` on type `miniquad::conf::Conf`
  --> /home/pavel/.cargo/registry/src/github.com-1ecc6299db9ec823/good-web-game-0.4.0/src/conf.rs:63:24
   |
63 |         self.quad_conf.cache = val;
   |                        ^^^^^ unknown field
   |
   = note: available fields are: `window_title`, `window_width`, `window_height`, `high_dpi`, `fullscreen` ... and 3 others

error[E0609]: no field `cache` on type `miniquad::conf::Conf`
  --> /home/pavel/.cargo/registry/src/github.com-1ecc6299db9ec823/good-web-game-0.4.0/src/filesystem.rs:28:70
   |
28 |         if let miniquad::conf::Cache::Tar(tar_file) = conf.quad_conf.cache {
   |                                                                      ^^^^^ unknown field
   |
   = note: available fields are: `window_title`, `window_width`, `window_height`, `high_dpi`, `fullscreen` ... and 3 others

Some errors have detailed explanations: E0412, E0433, E0560, E0609.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `good-web-game` due to 6 previous errors

but I also cant select newer version of good-web-game because of:

error: failed to select a version for the requirement `good-web-game = "=0.5.0"`
candidate versions found which didn't match: 0.4.0, 0.3.0

Am I missing something here?

PSteinhaus commented 2 years ago

good-web-game 0.4.0 had a problem with the selected miniquad version, which had to be pinned to alpha 37. This was solved in 0.4.1, so I recommend using the latest (and last) version of 0.4 which is 0.4.2.

It's weird that you can't find 0.5.0. Did you update your crates.io index? If not try running cargo update first.

EDIT: updating should also make 0.4.1 and 0.4.2 visible and useable to you as well, hopefully.

Pavel-N commented 2 years ago

Yes, all I had to do was cargo update in the docker container. Now I can compile for android just fine using the version 0.5.0