Add a new CI system for Linux/macOS/Windows, Azure Pipelines
Configuration based on https://github.com/crate-ci/azure-pipelines
Since crate-ci defaults to failing the build on clippy errors, forked to:
https://github.com/iceiix/azure-pipelines/tree/clippy
with configurable clippy parameters, to allow disabling the hard failures
(until the underlying causes for the warnings can be fixed).
* Allow erroring clippy float_cmp and unsafe ptrs
* Relax allowed clippy warnings
* Install xcb libraries for -lxcb-shape, -lxcb-xfixes
* Update shifted packet ids
* Add new smithing recipe type
* Also support 1.16 (735), same packets as 1.16.1 (736)
New packets:
* GenerateStructure
New packet variants:
* UseEntity_Sneakflag, split from UseEntity_Hand
* ClientAbilities_u8, split from ClientAbilities_f32
* UpdateJigsawBlock_Joint, split from UpdateJigsawBlock_Type
* ServerMessage_Sender, split from ServerMessage_Position
* ChunkData_Biomes3D_bool, split from ChunkData_Biomes3D
* JoinGame_WorldNames, split from JoinGame_HashedSeed_Respawn
* Respawn_WorldName, split from Respawn_Gamemode
* EntityEquipment_VarInt renamed
* UpdateLight_WithTrust, split from UpdateLight_NoTrust
* LoginSuccess_UUID, split from LoginSuccess_String
Thanks to @mwkroening (#317) and @martijnberger (#323) for helping fix this update.
* Update to glutin 0.22.0 and winit 0.20.0 release, removing alpha pinning
* scale_factor() replaces hidpi_factor()
* Listen for ScaleFactorChanged, separate from Resized event
* Fix getting physical size of window
* Fix logical mouse event coordinates
Update to structopt 0.3.15, closes#330
Update to base64 0.12.2, closes#329
Update to zip 0.5.6, closes#328
Update to serde_json 1.0.55, closes#327
Update to reqwest 0.10.6, closes#321
Update to flate2 1.0.14, closes#303
Update to byteorder 1.3.4, closes#285
The git dependency was only for wasm32-unknown-emscripten support:
https://github.com/aweinstock314/rust-clipboard/pull/62
but #92 changes to using wasm32-unknown-unknown instead, a better
supported path (though still incomplete in this project, see #171)
Closes#276 Bump serde_json from 1.0.44 to 1.0.45
Closes#274 Bump structopt from 0.3.7 to 0.3.8
Closes#273 Bump image from 0.22.3 to 0.22.4
Closes#272 Bump rand from 0.7.2 to 0.7.3
Closes#270 Bump num-traits from 0.2.10 to 0.2.11
Closes#269 Bump reqwest from 0.10.0 to 0.10.1
Completes the move of the protocol implementation into a new
crate, named steven_protocol, in the protocol/ subdirectory.
* Add Cargo.toml for steven_protocol
* Add steven_protocol entrypoint in protocol/src/lib.rs
* Use steven_protocol in main
* Remove protocol in main, replaced by steven_protocol
* Remove unused dependencies moved into steven_protocol
Improves fix for #184, whereas #255 reduced optimizations,
we now address the underlying compiler limitation and split out
the one massive lazy_static! initialization function, into
one function per block in the block_registration_functions module.
Previous build time, with opt-level=1:
% time cargo build --release
Compiling steven_blocks v0.0.1
Finished release [optimized] target(s) in 21.24s
cargo build --release 31.80s user 0.71s system 152% cpu 21.276 total
With this change, opt-level=3 and the function splitting fix:
% time cargo build --release
Compiling steven_blocks v0.0.1
Finished release [optimized] target(s) in 30.80s
cargo build --release 40.26s user 0.86s system 133% cpu 30.850 total
Full optimizations are expectedly slightly slower, but this is still
much much _much_ faster than before this refactoring, where this crate
would take up to an unbelievable 5 hours (and tens of GB of RAM). Long
story short, we're now back to full optimizations and stable Rust.
Thanks to dtolnay on the Rust programming language forum for suggesting
this technique, https://users.rust-lang.org/t/5-hours-to-compile-macro-what-can-i-do/36508/2
Update from glutin 0.21.x fork to glutin 0.22.0-alpha5 and corresponding
compatible version of winit. This removes our custom temporary wasm_stub
branches, back to mainline glutin and winit, and is a step towards WebAssembly
compatibility, most importantly merging the game loop and event loops as
required by winit _which now supports wasm_. Not yet functional on the web
because other web dependencies have to be added, see #171 and #34, but native
functionality is preserved.
* Update for 0.22 glutin API changes:
* Move game logic into event loop, run() replacing poll_events()
* Specify fullscreen Borderless mode
* Pass generic parameter of Event through handle_window_event
* hidpi_factor() replaces get_hidpi_factor()
* with_inner_size() replaces with_dimensions()
* No longer need to unwrap() LogicalSize
* set_cursor_grab/visible() replaces grab/hide_cursor()
* Fix modifiers deprecated warnings by destructuring only event fields we use, ignoring the rest with '..'
* Remove unnecessary mutability from events_loop
* Listen for ModifiersChanged event, fixing deprecated modifiers field
* Change to stdweb for web backend, replacing web-sys
* Pin to glutin =0.22.0-alpha5 and winit =0.20.0-alpha6
* Closes#237 Bump base64 from 0.10.1 to 0.11.0
* Closes#241 Bump flate2 from 1.0.12 to 1.0.13
* Closes#245 Bump num-traits from 0.2.8 to 0.2.10
* Closes#248 Bump serde_json from 1.0.41 to 1.0.44
* Closes#249 Bump serde from 1.0.102 to 1.0.104
* Closes#251 Bump web-sys from 0.3.30 to 0.3.33
* Closes#254 Bump structopt from 0.3.3 to 0.3.7
* Bump cfg-if from 0.1.9 to 0.1.10
* `cargo update` all modules
Reduce to "basic optimizations" for the steven_blocks module, so it
doesn't take hours of time and gigabytes of memory to compile. The main
program and other code still builds with full optimizations in release
mode, to accomplish this, the profile-overrides feature is required so
we also switch to nightly Rust (to be switched to 1.41+ in #258).
* Update to rustc 1.42.0-nightly (760ce94c6 2020-01-04)
* Update builds.sr.ht to use +nightly
* Override opt-level=1 for steven_blocks using profile-overrides
The Display trait is already implemented, so this is only a code
deletion. Fixes 1.42-nightly warning:
warning: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
--> src/protocol/mod.rs:981:40
|
981 | Error::IOError(ref e) => e.description(),
| ^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
The Display trait is already implemented, so this is only a code
deletion. Fixes 1.42-nightly warning:
warning: use of deprecated item 'std::error::Error::description': use the Display impl or to_string()
--> src/protocol/mod.rs:981:40
|
981 | Error::IOError(ref e) => e.description(),
| ^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added.
--> src/entity/player.rs:363:11
|
363 | ].into_iter().enumerate() {
| ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145>
Closes#196 Bump web-sys from 0.3.24 to 0.3.25
Closes#200 Bump reqwest from 0.9.18 to 0.9.19
Closes#202 Bump log from 0.4.6 to 0.4.8
Closes#203 Bump serde from 1.0.94 to 1.0.98
Closes#187 Bump web-sys from 0.3.22 to 0.3.24
Closes#188 Bump flate2 from 1.0.7 to 1.0.9
Closes#189 Bump structopt from 0.2.16 to 0.2.18
Closes#190 Bump serde from 1.0.92 to 1.0.94
Closes#192 Bump serde_json from 1.0.39 to 1.0.40
`cargo update` updates smallvec (and others) used by collision:
Closes#193 [Security] Bump smallvec from 0.6.9 to 0.6.10
Previously, only the * and + operators were available, for 0 or more and
1 or more, respectively, so steven_blocks used * for optional tokens
even though only one would be expected in most cases.
Rust version 1.32.0 added a new operator, ?, for zero or one:
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1320-2019-01-17
> You can now use the ? operator in macro definitions. The ? operator allows
> you to specify zero or one repetitions similar to the * and + operators.
https://github.com/rust-lang/rust/pull/56245/
Change to use ? instead of * for these optional repetitions.
Found this while investigating #174.