coeuvre / rust-2048

A 2048 clone with Piston game engine
MIT License
237 stars 40 forks source link

No longer builds #8

Closed alokdhir closed 9 years ago

alokdhir commented 10 years ago

Likely cause:

... warning: using multiple versions of crate graphics src/snake.rs:5:1: 5:23 note: used here src/snake.rs:5 extern crate graphics; ...

alokdhir commented 10 years ago

Oops - that was from rust snake which has the same problem. Here is the output from 2048:

Compiling rust-2048 v0.0.0 (file:///Users/adhir/src/rust-2048) warning: using multiple versions of crate graphics src/main.rs:6:1: 6:23 note: used here src/main.rs:6 extern crate graphics; ^~~~~~ note: crate name: graphics src/main.rs:7:1: 7:21 note: used here src/main.rs:7 extern crate piston; ^~~~~~~~ note: crate name: graphics src/main.rs:11:5: 11:15 error: import graphics conflicts with imported crate in this module src/main.rs:11 use piston::*; ^~~~~~ src/main.rs:12:5: 12:37 error: unresolved import sdl2_game_window::GameWindowSDL2. There is no GameWindowSDL2 in sdl2_game_window src/main.rs:12 use sdl2_game_window::GameWindowSDL2; ^~~~~~~~ error: aborting due to 2 previous errors Could not compile rust-2048.

vlakarados commented 9 years ago

Does not build for me too:

Compiling pistoncore-sdl2_window v0.0.6 (https://github.com/pistondevelopers/sdl2_window#520e8d41)
Compiling piston2d-opengl_graphics v0.0.10 (https://github.com/pistondevelopers/opengl_graphics#e08f8676)
Compiling rust-2048 v0.0.0 (file:///home/stelshevskis/rust/rust-2048)
src/settings.rs:130:21: 130:30 warning: derive(Decodable) is deprecated in favor of derive(RustcDecodable)
src/settings.rs:130 #[derive(Encodable, Decodable)]
                                        ^~~~~~~~~
src/settings.rs:130:10: 130:19 warning: derive(Encodable) is deprecated in favor of derive(RustcEncodable)
src/settings.rs:130 #[derive(Encodable, Decodable)]
                             ^~~~~~~~~
src/app.rs:83:27: 83:36 error: failed to resolve. Use of undeclared type or module `Path`
src/app.rs:83         let asset_store = Path::new(self.settings.asset_folder.as_slice());
                                        ^~~~~~~~~
src/app.rs:83:27: 83:36 error: unresolved name `Path::new`
src/app.rs:83         let asset_store = Path::new(self.settings.asset_folder.as_slice());
                                        ^~~~~~~~~
src/app.rs:104:40: 104:52 error: use of undeclared type name `KeyPressArgs`
src/app.rs:104     pub fn key_press(&mut self, args: &KeyPressArgs) {
                                                      ^~~~~~~~~~~~
src/board.rs:19:12: 19:15 error: use of undeclared type name `int`
src/board.rs:19     score: int,
                           ^~~
src/board.rs:37:90: 37:94 error: use of undeclared type name `uint`
src/board.rs:37         if self.tiles.len() == (self.settings.tile_width * self.settings.tile_height) as uint {
                                                                                                         ^~~~
src/board.rs:42:31: 42:35 error: use of undeclared type name `uint`
src/board.rs:42             let x = (random::<uint>() % self.settings.tile_width as uint) as int;
                                              ^~~~
src/board.rs:42:69: 42:73 error: use of undeclared type name `uint`
src/board.rs:42             let x = (random::<uint>() % self.settings.tile_width as uint) as int;
                                                                                    ^~~~
src/board.rs:42:78: 42:81 error: use of undeclared type name `int`
src/board.rs:42             let x = (random::<uint>() % self.settings.tile_width as uint) as int;
                                                                                             ^~~
src/board.rs:43:31: 43:35 error: use of undeclared type name `uint`
src/board.rs:43             let y = (random::<uint>() % self.settings.tile_height as uint) as int;
                                              ^~~~
src/board.rs:43:70: 43:74 error: use of undeclared type name `uint`
src/board.rs:43             let y = (random::<uint>() % self.settings.tile_height as uint) as int;
                                                                                     ^~~~
src/board.rs:43:79: 43:82 error: use of undeclared type name `int`
src/board.rs:43             let y = (random::<uint>() % self.settings.tile_height as uint) as int;
                                                                                              ^~~
src/board.rs:60:48: 60:52 error: use of undeclared type name `uint`
src/board.rs:60         let mut tiles_need_removed = HashSet::<uint>::new();
                                                               ^~~~
src/board.rs:62:18: 62:23 error: unresolved name `range`. Did you mean `self`?
src/board.rs:62         for i in range(0, self.tiles.len()) {
                                 ^~~~~
src/board.rs:67:22: 67:27 error: unresolved name `range`. Did you mean `self`?
src/board.rs:67             for j in range(i + 1, self.tiles.len()) {

src/board.rs:85:22: 85:27 error: unresolved name `range`. Did you mean `self`?
src/board.rs:85             for i in range(0, self.tiles.len()) {
                                     ^~~~~
src/board.rs:117:38: 117:41 error: use of undeclared type name `int`
src/board.rs:117     fn merge_col(&mut self, y_start: int, y_end: int, y_step: int) {
                                                      ^~~
src/board.rs:117:50: 117:53 error: use of undeclared type name `int`
src/board.rs:117     fn merge_col(&mut self, y_start: int, y_end: int, y_step: int) {
                                                                  ^~~
src/board.rs:117:63: 117:66 error: use of undeclared type name `int`
src/board.rs:117     fn merge_col(&mut self, y_start: int, y_end: int, y_step: int) {
                                                                               ^~~
src/board.rs:125:24: 125:29 error: unresolved name `range`. Did you mean `self`?
src/board.rs:125             for col in range(0, self.settings.tile_width) {
                                        ^~~~~
src/board.rs:145:24: 145:29 error: unresolved name `range`. Did you mean `self`?
src/board.rs:145             for col in range(0, self.settings.tile_width) {
                                        ^~~~~
src/board.rs:202:38: 202:41 error: use of undeclared type name `int`
src/board.rs:202     fn merge_row(&mut self, x_start: int, x_end: int, x_step: int) {
                                                      ^~~
src/board.rs:202:50: 202:53 error: use of undeclared type name `int`
src/board.rs:202     fn merge_row(&mut self, x_start: int, x_end: int, x_step: int) {
                                                                  ^~~
src/board.rs:202:63: 202:66 error: use of undeclared type name `int`
src/board.rs:202     fn merge_row(&mut self, x_start: int, x_end: int, x_step: int) {
                                                                               ^~~
src/board.rs:210:24: 210:29 error: unresolved name `range`. Did you mean `x_end`?
src/board.rs:210             for row in range(0, self.settings.tile_height) {
                                        ^~~~~
src/board.rs:230:24: 230:29 error: unresolved name `range`. Did you mean `x_end`?
src/board.rs:230             for row in range(0, self.settings.tile_height) {
                                        ^~~~~
src/board.rs:288:39: 288:42 error: use of undeclared type name `int`
src/board.rs:288     fn get_next_tile<'b>(&'b self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b Tile<'a>> {
                                                       ^~~
src/board.rs:288:47: 288:50 error: use of undeclared type name `int`
src/board.rs:288     fn get_next_tile<'b>(&'b self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b Tile<'a>> {
                                                               ^~~
src/board.rs:288:60: 288:63 error: use of undeclared type name `int`
src/board.rs:288     fn get_next_tile<'b>(&'b self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b Tile<'a>> {
                                                                            ^~~
src/board.rs:288:73: 288:76 error: use of undeclared type name `int`
src/board.rs:288     fn get_next_tile<'b>(&'b self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b Tile<'a>> {
                                                                                         ^~~
src/board.rs:303:47: 303:50 error: use of undeclared type name `int`
src/board.rs:303     fn get_mut_next_tile<'b>(&'b mut self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b mut Tile<'a>> {
                                                               ^~~
src/board.rs:303:55: 303:58 error: use of undeclared type name `int`
src/board.rs:303     fn get_mut_next_tile<'b>(&'b mut self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b mut Tile<'a>> {

src/board.rs:303:68: 303:71 error: use of undeclared type name `int`
src/board.rs:303     fn get_mut_next_tile<'b>(&'b mut self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b mut Tile<'a>> {
                                                                                    ^~~
src/board.rs:303:81: 303:84 error: use of undeclared type name `int`
src/board.rs:303     fn get_mut_next_tile<'b>(&'b mut self, x: int, y: int, step_x: int, step_y: int) -> Option<&'b mut Tile<'a>> {
                                                                                                 ^~~
src/board.rs:325:34: 325:37 error: use of undeclared type name `int`
src/board.rs:325     fn get_tile<'b>(&'b self, x: int, y: int) -> Option<&'b Tile<'a>> {
                                                  ^~~
src/board.rs:325:42: 325:45 error: use of undeclared type name `int`
src/board.rs:325     fn get_tile<'b>(&'b self, x: int, y: int) -> Option<&'b Tile<'a>> {
                                                          ^~~
src/board.rs:334:42: 334:45 error: use of undeclared type name `int`
src/board.rs:334     fn get_mut_tile<'b>(&'b mut self, x: int, y: int) -> Option<&'b mut Tile<'a>> {
                                                          ^~~
src/board.rs:334:50: 334:53 error: use of undeclared type name `int`
src/board.rs:334     fn get_mut_tile<'b>(&'b mut self, x: int, y: int) -> Option<&'b mut Tile<'a>> {
                                                                  ^~~
src/board.rs:343:33: 343:36 error: use of undeclared type name `int`
src/board.rs:343     fn get_tile_count(&self, x: int, y: int) -> int {
                                                 ^~~
src/board.rs:343:41: 343:44 error: use of undeclared type name `int`
src/board.rs:343     fn get_tile_count(&self, x: int, y: int) -> int {
                                                         ^~~
src/board.rs:343:49: 343:52 error: use of undeclared type name `int`
src/board.rs:343     fn get_tile_count(&self, x: int, y: int) -> int {
                                                                 ^~~
src/board.rs:367:18: 367:23 error: unresolved name `range`. Did you mean `gl`?
src/board.rs:367         for _ in range(0, self.settings.tile_height) {
                                  ^~~~~
src/board.rs:368:22: 368:27 error: unresolved name `range`. Did you mean `gl`?
src/board.rs:368             for _ in range(0, self.settings.tile_width) {
                                      ^~~~~
src/board.rs:390:36: 390:39 error: use of undeclared type name `int`
src/board.rs:390     fn add_score(&mut self, score: int) {
                                                    ^~~
src/number_renderer.rs:18:39: 18:48 error: failed to resolve. Use of undeclared type or module `Path`
src/number_renderer.rs:18             image: Texture::from_path(Path::new("digits.png")).unwrap(),
                                                                ^~~~~~~~~
src/number_renderer.rs:18:39: 18:48 error: unresolved name `Path::new`
src/number_renderer.rs:18             image: Texture::from_path(Path::new("digits.png")).unwrap(),
                                                                ^~~~~~~~~
src/settings.rs:22:21: 22:24 error: use of undeclared type name `int`
src/settings.rs:22     pub tile_width: int,
                                       ^~~
src/settings.rs:23:22: 23:25 error: use of undeclared type name `int`
src/settings.rs:23     pub tile_height: int,
                                        ^~~
src/settings.rs:143:17: 143:20 error: use of undeclared type name `int`
src/settings.rs:143     tile_width: int,
                                    ^~~
src/settings.rs:144:18: 144:21 error: use of undeclared type name `int`
src/settings.rs:144     tile_height: int,
                                     ^~~
src/settings.rs:219:34: 219:43 error: failed to resolve. Use of undeclared type or module `Path`
src/settings.rs:219         let path = exe_path.join(Path::new(SETTING_FILENAME));
                                                     ^~~~~~~~~
src/settings.rs:219:34: 219:43 error: unresolved name `Path::new`
src/settings.rs:219         let path = exe_path.join(Path::new(SETTING_FILENAME));
                                                     ^~~~~~~~~
src/settings.rs:237:43: 237:52 error: failed to resolve. Use of undeclared type or module `Path`
src/settings.rs:237         let path = exe_path.unwrap().join(Path::new(SETTING_FILENAME));
                                                              ^~~~~~~~~
src/settings.rs:237:43: 237:52 error: unresolved name `Path::new`
src/settings.rs:237         let path = exe_path.unwrap().join(Path::new(SETTING_FILENAME));
                                                              ^~~~~~~~~
src/tile.rs:12:31: 12:34 error: use of undeclared type name `int`
src/tile.rs:12     TileMoving(f64, f64, f64, int, int),
                                             ^~~
src/tile.rs:12:36: 12:39 error: use of undeclared type name `int`
src/tile.rs:12     TileMoving(f64, f64, f64, int, int),
                                                  ^~~
src/tile.rs:21:16: 21:19 error: use of undeclared type name `int`
src/tile.rs:21     pub score: int,
                              ^~~
src/tile.rs:22:17: 22:20 error: use of undeclared type name `int`
src/tile.rs:22     pub tile_x: int,
                               ^~~
src/tile.rs:23:17: 23:20 error: use of undeclared type name `int`
src/tile.rs:23     pub tile_y: int,
                               ^~~
src/tile.rs:30:47: 30:50 error: use of undeclared type name `int`
src/tile.rs:30     pub fn new(settings: &'a Settings, score: int, tile_x: int, tile_y: int) -> Tile<'a> {
                                                             ^~~
src/tile.rs:30:60: 30:63 error: use of undeclared type name `int`
src/tile.rs:30     pub fn new(settings: &'a Settings, score: int, tile_x: int, tile_y: int) -> Tile<'a> {
                                                                          ^~~
src/tile.rs:30:73: 30:76 error: use of undeclared type name `int`
src/tile.rs:30     pub fn new(settings: &'a Settings, score: int, tile_x: int, tile_y: int) -> Tile<'a> {
                                                                                       ^~~
src/tile.rs:41:56: 41:59 error: use of undeclared type name `int`
src/tile.rs:41     pub fn new_combined(settings: &'a Settings, score: int, tile_x: int, tile_y: int) -> Tile<'a> {
                                                                      ^~~
src/tile.rs:41:69: 41:72 error: use of undeclared type name `int`
src/tile.rs:41     pub fn new_combined(settings: &'a Settings, score: int, tile_x: int, tile_y: int) -> Tile<'a> {
                                                                                   ^~~
src/tile.rs:41:82: 41:85 error: use of undeclared type name `int`
src/tile.rs:41     pub fn new_combined(settings: &'a Settings, score: int, tile_x: int, tile_y: int) -> Tile<'a> {
                                                                                                ^~~
src/tile.rs:52:35: 52:38 error: use of undeclared type name `int`
src/tile.rs:52     fn tile_to_pos(&self, tile_x: int, tile_y: int) -> (f64, f64) {
                                                 ^~~
src/tile.rs:52:48: 52:51 error: use of undeclared type name `int`
src/tile.rs:52     fn tile_to_pos(&self, tile_x: int, tile_y: int) -> (f64, f64) {
                                                              ^~~
src/tile.rs:58:56: 58:59 error: use of undeclared type name `int`
src/tile.rs:58     pub fn start_moving(&mut self, destination_tile_x: int, destination_tile_y: int) {
                                                                      ^~~
src/tile.rs:58:81: 58:84 error: use of undeclared type name `int`
src/tile.rs:58     pub fn start_moving(&mut self, destination_tile_x: int, destination_tile_y: int) {
                                                                                               ^~~
src/tile.rs:140:47: 140:51 error: use of undeclared type name `uint`
src/tile.rs:140         let i = (self.score as f64).log2() as uint;
                                                              ^~~~
error: aborting due to 69 previous errors
Could not compile `rust-2048`.