Fixing Tarpaulin isn't easy.

So first off all we had to update the toolchain, i think everything in september is okay, but we got with this current version.
Then we had to update several dependencies, which broke:
 - need a specific fix of winit, i think we want to get rid of this with iced, hopefully, because its buggy as hell. update wayland client to 0.27
 - use a updated version of glutin which has wayland-client 0.27 and no longer the broke version 0.23
 - update conrod to use modern copypasta 0.7
 - use `packed_simd_2` instead of `packed_simd` as the owner of the create abandoned the project.
 - adjust all the coding to work with the newer glutin and winit version. that also includes fixing a macro in one of the dependencies that did some crazy conversion from 1 event type to another event type.
   It was called `convert_event`
 - make a `simd` feature which is default and introduce conditional compiling.
   AS I HAVE NO IDEA OF SIMD AND THE CODE. AND I DIDN'T INTRODUCE THE ERROR IN THE FIRST PLACE, WE PANIC FOR NON SIMD CASE FOR NOW. BUT IT WORKS FOR TESTS.
 - tarpaulin doesnt support no-default-features. so we have to `sed` them away. semms fair.
This commit is contained in:
Marcel Märtens 2020-09-29 14:29:18 +02:00
parent 4a7eb7f786
commit 153c6c3b13
15 changed files with 922 additions and 587 deletions

View File

@ -20,15 +20,19 @@ benchmarks:
retry: retry:
max: 2 max: 2
# # Coverage is needed on master for the README.md badge to work # Coverage is needed on master for the README.md badge to work
# coverage: # tmp remove platform_intrinsics from vek as it doesnt work with tarpaulin
# extends: .recompile coverage:
# stage: build extends: .recompile-branch
# script: stage: build
# - ln -s /dockercache/cache-tarpaulin target script:
# - cargo tarpaulin -v - ln -s /dockercache/cache-tarpaulin target
# retry: - find ./* -name "Cargo.toml" -exec sed -i 's/, "simd"]/]/g' {} \;
# max: 2 - find ./* -name "Cargo.toml" -exec sed -i 's/"simd"]/]/g' {} \;
- sed -i 's/vek /#vek /g' ./Cargo.toml;
- cargo tarpaulin -v --test-threads=2
retry:
max: 2
#linux, windows, macos builds here as template #linux, windows, macos builds here as template
.tlinux: .tlinux:

1412
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -79,5 +79,6 @@ debug = 1
[patch.crates-io] [patch.crates-io]
# cpal conflict fix isn't released yet # cpal conflict fix isn't released yet
winit = { git = "https://github.com/Imberflur/winit.git", branch = "macos-test" } winit = { git = "https://gitlab.com/veloren/winit.git", branch = "macos-test-rebased" }
glutin = {git = "https://github.com/rust-windowing/glutin.git", rev="63a1ea7d6e64c5112418cab9f21cd409f0afd7c2"}
vek = { git = "https://gitlab.com/veloren/vek.git", branch = "fix_intrinsics" } vek = { git = "https://gitlab.com/veloren/vek.git", branch = "fix_intrinsics" }

View File

@ -4,6 +4,11 @@ version = "0.7.0"
authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>"] authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>"]
edition = "2018" edition = "2018"
[features]
simd = ["vek/platform_intrinsics"]
default = ["simd"]
[dependencies] [dependencies]
common = { package = "veloren-common", path = "../common", features = ["no-assets"] } common = { package = "veloren-common", path = "../common", features = ["no-assets"] }
network = { package = "veloren_network", path = "../network", features = ["compression"], default-features = false } network = { package = "veloren_network", path = "../network", features = ["compression"], default-features = false }
@ -19,6 +24,6 @@ num_cpus = "1.10.1"
tracing = { version = "0.1", default-features = false } tracing = { version = "0.1", default-features = false }
rayon = "^1.3.0" rayon = "^1.3.0"
specs = { git = "https://github.com/amethyst/specs.git", rev = "7a2e348ab2223818bad487695c66c43db88050a5" } specs = { git = "https://github.com/amethyst/specs.git", rev = "7a2e348ab2223818bad487695c66c43db88050a5" }
vek = { version = "0.12.0", features = ["platform_intrinsics", "serde"] } vek = { version = "0.12.0", features = ["serde"] }
hashbrown = { version = "0.7.2", features = ["rayon", "serde", "nightly"] } hashbrown = { version = "0.7.2", features = ["rayon", "serde", "nightly"] }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "b943c85e4a38f5ec60cd18c34c73097640162bfe" } authc = { git = "https://gitlab.com/veloren/auth.git", rev = "b943c85e4a38f5ec60cd18c34c73097640162bfe" }

View File

@ -7,6 +7,9 @@ edition = "2018"
[features] [features]
no-assets = [] no-assets = []
tracy = ["tracy-client"] tracy = ["tracy-client"]
simd = ["vek/platform_intrinsics"]
default = ["simd"]
[dependencies] [dependencies]
arraygen = "0.1.13" arraygen = "0.1.13"
@ -14,7 +17,7 @@ specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git", branch = "spec
roots = "0.0.6" roots = "0.0.6"
specs = { git = "https://github.com/amethyst/specs.git", features = ["serde", "storage-event-control"], rev = "7a2e348ab2223818bad487695c66c43db88050a5" } specs = { git = "https://github.com/amethyst/specs.git", features = ["serde", "storage-event-control"], rev = "7a2e348ab2223818bad487695c66c43db88050a5" }
vek = { version = "0.12.0", features = ["platform_intrinsics", "serde"] } vek = { version = "0.12.0", features = ["serde"] }
directories-next = "1.0.1" directories-next = "1.0.1"
dot_vox = "4.0" dot_vox = "4.0"
image = { version = "0.23.8", default-features = false, features = ["png"] } image = { version = "0.23.8", default-features = false, features = ["png"] }

View File

@ -4,7 +4,6 @@
//!E.g. in the same time 100 prio0 messages are send, only 50 prio5, 25 prio10, //!E.g. in the same time 100 prio0 messages are send, only 50 prio5, 25 prio10,
//! 12 prio15 or 6 prio20 messages are send. Note: TODO: prio0 will be send //! 12 prio15 or 6 prio20 messages are send. Note: TODO: prio0 will be send
//! immediately when found! //! immediately when found!
//!
#[cfg(feature = "metrics")] #[cfg(feature = "metrics")]
use crate::metrics::NetworkMetrics; use crate::metrics::NetworkMetrics;
use crate::{ use crate::{

View File

@ -1 +1 @@
nightly-2020-08-15 nightly-2020-10-25

View File

@ -6,7 +6,9 @@ edition = "2018"
[features] [features]
worldgen = [] worldgen = []
default = ["worldgen"] simd = ["vek/platform_intrinsics"]
default = ["worldgen", "simd"]
[dependencies] [dependencies]
common = { package = "veloren-common", path = "../common" } common = { package = "veloren-common", path = "../common" }
@ -17,7 +19,7 @@ specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git", branch = "spec
tracing = "0.1" tracing = "0.1"
specs = { git = "https://github.com/amethyst/specs.git", features = ["shred-derive"], rev = "7a2e348ab2223818bad487695c66c43db88050a5" } specs = { git = "https://github.com/amethyst/specs.git", features = ["shred-derive"], rev = "7a2e348ab2223818bad487695c66c43db88050a5" }
vek = { version = "0.12.0", features = ["platform_intrinsics", "serde"] } vek = { version = "0.12.0", features = ["serde"] }
uvth = "3.1.1" uvth = "3.1.1"
futures-util = "0.3" futures-util = "0.3"
futures-executor = "0.3" futures-executor = "0.3"

View File

@ -13,8 +13,9 @@ gl = ["gfx_device_gl", "gfx_gl"]
hot-anim = ["anim/use-dyn-lib"] hot-anim = ["anim/use-dyn-lib"]
singleplayer = ["server"] singleplayer = ["server"]
tweak = ["const-tweaker"] tweak = ["const-tweaker"]
simd = ["vek/platform_intrinsics"]
default = ["gl", "singleplayer", "native-dialog"] default = ["gl", "singleplayer", "native-dialog", "simd"]
[dependencies] [dependencies]
client = {package = "veloren-client", path = "../client"} client = {package = "veloren-client", path = "../client"}
@ -23,13 +24,13 @@ common = {package = "veloren-common", path = "../common"}
anim = {package = "veloren-voxygen-anim", path = "src/anim", default-features = false} anim = {package = "veloren-voxygen-anim", path = "src/anim", default-features = false}
# Graphics # Graphics
conrod_core = {git = "https://gitlab.com/veloren/conrod.git"} conrod_core = {git = "https://gitlab.com/veloren/conrod.git", branch="copypasta_0.7"}
conrod_winit = {git = "https://gitlab.com/veloren/conrod.git"} conrod_winit = {git = "https://gitlab.com/veloren/conrod.git", branch="copypasta_0.7"}
euc = {git = "https://github.com/zesterer/euc.git"} euc = {git = "https://github.com/zesterer/euc.git"}
gfx = "0.18.2" gfx = "0.18.2"
gfx_device_gl = {version = "0.16.2", optional = true} gfx_device_gl = {version = "0.16.2", optional = true}
gfx_gl = {version = "0.6.1", optional = true} gfx_gl = {version = "0.6.1", optional = true}
glutin = "0.24.1" glutin = {git = "https://github.com/rust-windowing/glutin.git", rev="63a1ea7d6e64c5112418cab9f21cd409f0afd7c2"}
old_school_gfx_glutin_ext = "0.24" old_school_gfx_glutin_ext = "0.24"
winit = {version = "0.22.2", features = ["serde"]} winit = {version = "0.22.2", features = ["serde"]}
@ -38,7 +39,7 @@ specs = {git = "https://github.com/amethyst/specs.git", rev = "7a2e348ab2223818b
specs-idvs = {git = "https://gitlab.com/veloren/specs-idvs.git", branch = "specs-git"} specs-idvs = {git = "https://gitlab.com/veloren/specs-idvs.git", branch = "specs-git"}
# Mathematics # Mathematics
vek = {version = "0.12.0", features = ["platform_intrinsics", "serde"]} vek = {version = "0.12.0", features = ["serde"]}
# Controller # Controller
gilrs = {version = "0.7", features = ["serde"]} gilrs = {version = "0.7", features = ["serde"]}

View File

@ -13,8 +13,9 @@ crate-type = ["lib", "cdylib"]
[features] [features]
be-dyn-lib = [] be-dyn-lib = []
use-dyn-lib = ["libloading", "notify", "lazy_static", "tracing", "find_folder"] use-dyn-lib = ["libloading", "notify", "lazy_static", "tracing", "find_folder"]
simd = ["vek/platform_intrinsics"]
default = ["be-dyn-lib"] default = ["be-dyn-lib", "simd"]
[dependencies] [dependencies]
common = {package = "veloren-common", path = "../../../common"} common = {package = "veloren-common", path = "../../../common"}
@ -24,4 +25,4 @@ lazy_static = {version = "1.4.0", optional = true}
libloading = {version = "0.6.2", optional = true} libloading = {version = "0.6.2", optional = true}
notify = {version = "5.0.0-pre.2", optional = true} notify = {version = "5.0.0-pre.2", optional = true}
tracing = {version = "0.1", optional = true} tracing = {version = "0.1", optional = true}
vek = {version = "0.12.0", features = ["platform_intrinsics", "serde"]} vek = {version = "0.12.0", features = ["serde"]}

View File

@ -2299,6 +2299,7 @@ impl<'a> Widget for SettingsWindow<'a> {
.window() .window()
.window() .window()
.current_monitor() .current_monitor()
.unwrap()
.video_modes() .video_modes()
.collect(); .collect();

View File

@ -493,7 +493,10 @@ impl FigureMgr {
let collides_with_aabr = |a: math::Aabr<f32>, b: math::Aabr<f32>| { let collides_with_aabr = |a: math::Aabr<f32>, b: math::Aabr<f32>| {
let min = math::Vec4::new(a.min.x, a.min.y, b.min.x, b.min.y); let min = math::Vec4::new(a.min.x, a.min.y, b.min.x, b.min.y);
let max = math::Vec4::new(b.max.x, b.max.y, a.max.x, a.max.y); let max = math::Vec4::new(b.max.x, b.max.y, a.max.x, a.max.y);
min.partial_cmple_simd(max).reduce_and() #[cfg(feature = "simd")]
return min.partial_cmple_simd(max).reduce_and();
#[cfg(not(feature = "simd"))]
return min.partial_cmple(&max).reduce_and();
}; };
move |pos: (anim::vek::Vec3<f32>,), radius: f32| { move |pos: (anim::vek::Vec3<f32>,), radius: f32| {
// Short circuit when there are no shadows to cast. // Short circuit when there are no shadows to cast.

View File

@ -844,7 +844,10 @@ impl<V: RectRasterableVol> Terrain<V> {
let collides_with_aabr = |a: math::Aabb<f32>, b: math::Aabr<f32>| { let collides_with_aabr = |a: math::Aabb<f32>, b: math::Aabr<f32>| {
let min = math::Vec4::new(a.min.x, a.min.y, b.min.x, b.min.y); let min = math::Vec4::new(a.min.x, a.min.y, b.min.x, b.min.y);
let max = math::Vec4::new(b.max.x, b.max.y, a.max.x, a.max.y); let max = math::Vec4::new(b.max.x, b.max.y, a.max.x, a.max.y);
min.partial_cmple_simd(max).reduce_and() #[cfg(feature = "simd")]
return min.partial_cmple_simd(max).reduce_and();
#[cfg(not(feature = "simd"))]
return min.partial_cmple(&max).reduce_and();
}; };
let (visible_light_volume, visible_psr_bounds) = if ray_direction.z < 0.0 let (visible_light_volume, visible_psr_bounds) = if ray_direction.z < 0.0
&& renderer.render_mode().shadow.is_map() && renderer.render_mode().shadow.is_map()

View File

@ -403,7 +403,7 @@ impl fmt::Display for KeyMouse {
Key(Numpad9) => "Numpad 9", Key(Numpad9) => "Numpad 9",
Key(AbntC1) => "Abnt C1", Key(AbntC1) => "Abnt C1",
Key(AbntC2) => "Abnt C2", Key(AbntC2) => "Abnt C2",
Key(Add) => "Numpad +", Key(NumpadAdd) => "Numpad +",
Key(Apostrophe) => "'", Key(Apostrophe) => "'",
Key(Apps) => "Context Menu", Key(Apps) => "Context Menu",
Key(At) => "@", Key(At) => "@",
@ -414,8 +414,8 @@ impl fmt::Display for KeyMouse {
Key(Colon) => ":", Key(Colon) => ":",
Key(Comma) => ",", Key(Comma) => ",",
Key(Convert) => "Convert", Key(Convert) => "Convert",
Key(Decimal) => "Numpad .", Key(NumpadDecimal) => "Numpad .",
Key(Divide) => "Numpad /", Key(NumpadDivide) => "Numpad /",
Key(Equals) => "=", Key(Equals) => "=",
Key(Grave) => "`", Key(Grave) => "`",
Key(Kana) => "Kana", Key(Kana) => "Kana",
@ -429,7 +429,7 @@ impl fmt::Display for KeyMouse {
Key(MediaSelect) => "MediaSelect", Key(MediaSelect) => "MediaSelect",
Key(MediaStop) => "MediaStop", Key(MediaStop) => "MediaStop",
Key(Minus) => "-", Key(Minus) => "-",
Key(Multiply) => "Numpad *", Key(NumpadMultiply) => "Numpad *",
Key(Mute) => "Mute", Key(Mute) => "Mute",
Key(MyComputer) => "My Computer", Key(MyComputer) => "My Computer",
Key(NavigateForward) => "Navigate Forward", Key(NavigateForward) => "Navigate Forward",
@ -453,7 +453,7 @@ impl fmt::Display for KeyMouse {
Key(Slash) => "/", Key(Slash) => "/",
Key(Sleep) => "Sleep", Key(Sleep) => "Sleep",
Key(Stop) => "Media Stop", Key(Stop) => "Media Stop",
Key(Subtract) => "Num -", Key(NumpadSubtract) => "Num -",
Key(Sysrq) => "Sysrq", Key(Sysrq) => "Sysrq",
Key(Tab) => "Tab", Key(Tab) => "Tab",
Key(Underline) => "_", Key(Underline) => "_",
@ -472,6 +472,8 @@ impl fmt::Display for KeyMouse {
Key(Copy) => "Copy", Key(Copy) => "Copy",
Key(Paste) => "Paste", Key(Paste) => "Paste",
Key(Cut) => "Cut", Key(Cut) => "Cut",
Key(Asterisk) => "*",
Key(Plus) => "+",
Mouse(MouseButton::Left) => "M1", Mouse(MouseButton::Left) => "M1",
Mouse(MouseButton::Right) => "M2", Mouse(MouseButton::Right) => "M2",
Mouse(MouseButton::Middle) => "M3", Mouse(MouseButton::Middle) => "M3",
@ -1087,6 +1089,7 @@ impl Window {
let window = self.window.window(); let window = self.window.window();
window window
.current_monitor() .current_monitor()
.unwrap()
.video_modes() .video_modes()
.filter(|mode| mode.size().width == resolution[0] as u32) .filter(|mode| mode.size().width == resolution[0] as u32)
.filter(|mode| mode.size().height == resolution[1] as u32) .filter(|mode| mode.size().height == resolution[1] as u32)
@ -1237,7 +1240,7 @@ impl Window {
self self
.window .window
.window() .window()
.current_monitor() .current_monitor().unwrap()
.video_modes() .video_modes()
// Prefer bit depth over refresh rate // Prefer bit depth over refresh rate
.sorted_by_key(|mode| mode.refresh_rate()) .sorted_by_key(|mode| mode.refresh_rate())

View File

@ -4,6 +4,11 @@ version = "0.7.0"
authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>"] authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>"]
edition = "2018" edition = "2018"
[features]
simd = ["vek/platform_intrinsics"]
default = ["simd"]
[dependencies] [dependencies]
bincode = "1.2.0" bincode = "1.2.0"
common = { package = "veloren-common", path = "../common" } common = { package = "veloren-common", path = "../common" }
@ -11,7 +16,7 @@ bitvec = "0.17.4"
fxhash = "0.2.1" fxhash = "0.2.1"
image = { version = "0.23.8", default-features = false, features = ["png"] } image = { version = "0.23.8", default-features = false, features = ["png"] }
itertools = "0.9" itertools = "0.9"
vek = { version = "0.12.0", features = ["platform_intrinsics", "serde"] } vek = { version = "0.12.0", features = ["serde"] }
noise = { version = "0.6.0", default-features = false } noise = { version = "0.6.0", default-features = false }
num = "0.2" num = "0.2"
ordered-float = "1.0" ordered-float = "1.0"
@ -21,7 +26,7 @@ tracing = { version = "0.1", default-features = false }
rand = "0.7" rand = "0.7"
rand_chacha = "0.2.1" rand_chacha = "0.2.1"
arr_macro = "0.1.2" arr_macro = "0.1.2"
packed_simd = "0.3.3" packed_simd = { version = "0.3.4", package = "packed_simd_2" }
rayon = "^1.3.0" rayon = "^1.3.0"
serde = { version = "1.0.110", features = ["derive"] } serde = { version = "1.0.110", features = ["derive"] }
ron = { version = "0.6", default-features = false } ron = { version = "0.6", default-features = false }