updating dependencies,

cannot update the following dependencies:
 - vek: Sharps SIMD isnt upstream
 - tracing-subscriber: MakeWriter was adjusted and i was to lazy to fiddle with lifetimes,
 - refinery, rustsql: we have a custom refinery version which is incompatible with newer rustsql
 - equi + egui_winit + egui_wgpu_backend: i tried it in this commit but it turned out that they dependo n wgpu which we cant update
 - wgpu: cant update due new version doesnt support DX11

Got quinn updated which now require some dependencies to be explicit.
This commit is contained in:
Marcel Märtens 2021-11-19 14:01:08 +01:00
parent 5274bf9eb3
commit e29ede7c97
20 changed files with 784 additions and 523 deletions

1161
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ network = { package = "veloren-network", path = "../network", features = ["compr
byteorder = "1.3.2"
tokio = { version = "1.11", default-features = false, features = ["rt-multi-thread"] }
quinn = "0.7.2"
quinn = "0.8"
image = { version = "0.23.12", default-features = false, features = ["png"] }
num = "0.4"
tracing = { version = "0.1", default-features = false }
@ -37,7 +37,7 @@ authc = { git = "https://gitlab.com/veloren/auth.git", rev = "fb3dcbc4962b367253
async-channel = { version = "1.6", optional = true }
common-ecs = { package = "veloren-common-ecs", path = "../common/ecs", optional = true }
serde = { version = "1.0", features = [ "rc", "derive" ], optional = true }
ron = { version = "0.6", default-features = false, optional = true }
ron = { version = "0.7", default-features = false, optional = true }
clap = { version = "2.33", optional = true }
rustyline = { version = "9.0.0", optional = true }
## logging

View File

@ -235,7 +235,7 @@ impl Client {
"QUIC is enabled. This is experimental and you won't be able to connect to \
TCP servers unless deactivated"
);
let config = quinn::ClientConfigBuilder::default().build();
let config = quinn::ClientConfig::with_native_roots();
addr::try_connect(&network, &hostname, prefer_ipv6, |a| {
ConnectAddr::Quic(a, config.clone(), hostname.clone())
})

View File

@ -28,9 +28,9 @@ enum-iterator = "0.7"
vek = { version = "=0.14.1", features = ["serde"] }
# Strum
strum = { version = "0.21", features = ["derive"] }
strum = { version = "0.23", features = ["derive"] }
# TODO: remove this and rewrite every use of strum_macros to strum
strum_macros = "0.21"
strum_macros = "0.23"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
approx = "0.4.0"
@ -82,7 +82,7 @@ specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git", rev = "8be2abc
criterion = "0.3"
#test
tracing-subscriber = { version = "0.2.15", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
[[bench]]
name = "chonk_benchmark"

View File

@ -8,7 +8,7 @@ version = "0.10.0"
[dependencies]
lazy_static = "1.4.0"
assets_manager = {version = "0.6.0", features = ["bincode", "ron", "json"]}
ron = { version = "0.6", default-features = false }
ron = { version = "0.7", default-features = false }
dot_vox = "4.0"
image = { version = "0.23.12", default-features = false, features = ["png"] }
tracing = "0.1"

View File

@ -14,9 +14,9 @@ common-base = { package = "veloren-common-base", path = "../base" }
# Logging
termcolor = "1.1"
tracing = { version = "0.1", default-features = false }
tracing-appender = "0.1"
tracing-appender = "0.1.2"
tracing-log = "0.1.1"
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec", "tracing-log"]}
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec", "tracing-log"]}
# Tracy
tracing-tracy = { version = "0.6.0", optional = true }
tracing-tracy = { version = "0.8.0", optional = true }

View File

@ -7,7 +7,7 @@ use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use serde::{Deserialize, Serialize};
use std::ops::Deref;
use strum_macros::{EnumIter, EnumString, ToString};
use strum_macros::{Display, EnumIter, EnumString};
use vek::*;
make_case_elim!(
@ -24,7 +24,7 @@ make_case_elim!(
FromPrimitive,
EnumString,
EnumIter,
ToString,
Display,
)]
#[repr(u8)]
pub enum BlockKind {

View File

@ -35,7 +35,7 @@ async-channel = "1.5.1" #use for .close() channels
lazy_static = { version = "1.4", default-features = false }
rand = { version = "0.8" }
#quic support
quinn = { version = "0.7.2", optional = true }
quinn = { version = "0.8", optional = true }
#stream flags
bitflags = "1.2.1"
lz-fear = { version = "0.1.1", optional = true }
@ -46,7 +46,7 @@ bytes = "^1"
hashbrown = { version = ">=0.9, <0.12" }
[dev-dependencies]
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec"] }
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec"] }
tokio = { version = "1.11", default-features = false, features = ["io-std", "fs", "rt-multi-thread"] }
futures-util = { version = "0.3.7", default-features = false, features = ["sink", "std"] }
clap = { version = "2.33", default-features = false }

View File

@ -28,7 +28,7 @@ hashbrown = { version = ">=0.9, <0.12" }
[dev-dependencies]
async-channel = "1.5.1"
tokio = { version = "1.11", default-features = false, features = ["rt", "macros"] }
tokio = { version = "1.14", default-features = false, features = ["rt", "macros"] }
criterion = { version = "0.3.4", features = ["default", "async_tokio"] }
[[bench]]

View File

@ -226,23 +226,20 @@ impl Protocols {
metrics: ProtocolMetricCache,
) -> Result<Self, NetworkConnectError> {
let config = config.clone();
let endpoint = quinn::Endpoint::builder();
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
let bindsock = match addr {
SocketAddr::V4(_) => SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0),
SocketAddr::V6(_) => {
SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)), 0)
},
SocketAddr::V4(_) => SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0),
SocketAddr::V6(_) => SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), 0),
};
let (endpoint, _) = match endpoint.bind(&bindsock) {
let endpoint = match quinn::Endpoint::client(bindsock) {
Ok(e) => e,
Err(quinn::EndpointError::Socket(e)) => return Err(NetworkConnectError::Io(e)),
Err(e) => return Err(NetworkConnectError::Io(e)),
};
info!("Connecting Quic to: {}", &addr);
let connecting = endpoint.connect_with(config, &addr, &name).map_err(|e| {
let connecting = endpoint.connect_with(config, addr, &name).map_err(|e| {
trace!(?e, "error setting up quic");
NetworkConnectError::Io(std::io::Error::new(
std::io::ErrorKind::ConnectionAborted,
@ -276,11 +273,9 @@ impl Protocols {
s2s_stop_listening_r: oneshot::Receiver<()>,
c2s_protocol_s: mpsc::UnboundedSender<(Self, Cid)>,
) -> std::io::Result<()> {
let mut endpoint = quinn::Endpoint::builder();
endpoint.listen(server_config);
let (_endpoint, mut listener) = match endpoint.bind(&addr) {
let (_endpoint, mut listener) = match quinn::Endpoint::server(server_config, addr) {
Ok(v) => v,
Err(quinn::EndpointError::Socket(e)) => return Err(e),
Err(e) => return Err(e),
};
trace!(?addr, "Quic Listener bound");
let mut end_receiver = s2s_stop_listening_r.fuse();

View File

@ -36,12 +36,12 @@ num_cpus = "1.0"
ansi-parser = "0.8"
clap = "2.33"
structopt = "0.3.13"
crossterm = "0.21"
crossterm = "0.22"
lazy_static = "1"
signal-hook = "0.3.6"
shell-words = "1.0.0"
tracing = { version = "0.1", default-features = false }
ron = {version = "0.6", default-features = false}
ron = {version = "0.7", default-features = false}
serde = {version = "1.0", features = [ "rc", "derive" ]}
[dependencies.tui]

View File

@ -28,7 +28,7 @@ network = { package = "veloren-network", path = "../network", features = ["metri
specs = { git = "https://github.com/amethyst/specs.git", features = ["shred-derive"], rev = "f985bec5d456f7b0dd8aae99848f9473c2cd9d46" }
specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git", rev = "8be2abcddf8f524cb5876e8dd20a7e47cfaf7573" }
strum = { version = "0.21", features = ["derive"] }
strum = { version = "0.23", features = ["derive"] }
bincode = "1.3.2"
num_cpus = "1.0"
tracing = "0.1"
@ -36,13 +36,15 @@ vek = { version = "0.14.1", features = ["serde"] }
futures-util = "0.3.7"
tokio = { version = "1.11", default-features = false, features = ["rt"] }
prometheus-hyper = "0.1.2"
quinn = "0.7.2"
quinn = "0.8"
rustls = { version = "0.20", default-features = false }
rustls-pemfile = { version = "0.2.1", default-features = false }
atomicwrites = "0.3.0"
chrono = { version = "0.4.9", features = ["serde"] }
chrono = { version = "0.4.19", features = ["serde"] }
humantime = "2.1.0"
itertools = "0.10"
lazy_static = "1.4.0"
ron = { version = "0.6", default-features = false }
ron = { version = "0.7", default-features = false }
serde = { version = "1.0.110", features = ["derive"] }
serde_json = "1.0.50"
rand = { version = "0.8", features = ["small_rng"] }

View File

@ -464,26 +464,36 @@ impl Server {
runtime.block_on(network.listen(ListenAddr::Tcp(settings.gameserver_address)))?;
runtime.block_on(network.listen(ListenAddr::Mpsc(14004)))?;
if let Some(quic) = &settings.quic_files {
use rustls_pemfile::Item;
use std::fs;
match || -> Result<_, Box<dyn std::error::Error>> {
let mut server_config =
quinn::ServerConfigBuilder::new(quinn::ServerConfig::default());
let key = fs::read(&quic.key)?;
let key = if quic.key.extension().map_or(false, |x| x == "der") {
quinn::PrivateKey::from_der(&key)?
rustls::PrivateKey(key)
} else {
quinn::PrivateKey::from_pem(&key)?
debug!("convert pem key to der");
let key = rustls_pemfile::read_all(&mut key.as_slice())?
.into_iter()
.find_map(|item| match item {
Item::RSAKey(v) | Item::PKCS8Key(v) => Some(v),
Item::X509Certificate(_) => None,
})
.ok_or("No valid pem key in file")?;
rustls::PrivateKey(key)
};
let cert_chain = fs::read(&quic.cert)?;
let cert_chain = if quic.cert.extension().map_or(false, |x| x == "der") {
quinn::CertificateChain::from_certs(Some(
quinn::Certificate::from_der(&cert_chain).unwrap(),
))
vec![rustls::Certificate(cert_chain)]
} else {
quinn::CertificateChain::from_pem(&cert_chain)?
debug!("convert pem cert to der");
let certs = rustls_pemfile::certs(&mut cert_chain.as_slice())?;
certs
.into_iter()
.map(|cert| rustls::Certificate(cert))
.collect()
};
server_config.certificate(cert_chain, key)?;
Ok(server_config.build())
let server_config = quinn::ServerConfig::with_single_cert(cert_chain, key)?;
Ok(server_config)
}() {
Ok(server_config) => {
warn!(

View File

@ -68,9 +68,9 @@ glyph_brush = "0.7.0"
keyboard-keynames = { git = "https://gitlab.com/Frinksy/keyboard-keynames.git", branch = "develop" }
# EGUI
egui = {version = "0.12", optional = true }
egui = {version = "0.15", optional = true }
egui_wgpu_backend = {git = "https://github.com/hasenbanck/egui_wgpu_backend.git", rev = "63a002c6a9b6c016e45806dd065864431caab621", optional = true }
egui_winit_platform = {version = "0.8", optional = true }
egui_winit_platform = {version = "0.11", optional = true }
# ECS
specs = {git = "https://github.com/amethyst/specs.git", rev = "f985bec5d456f7b0dd8aae99848f9473c2cd9d46"}
@ -88,7 +88,7 @@ server = { package = "veloren-server", path = "../server", optional = true, defa
# Utility
backtrace = "0.3.40"
bincode = "1.3.1"
chrono = { version = "0.4.9", features = ["serde"] }
chrono = { version = "0.4.19", features = ["serde"] }
chumsky = "0.3.2"
cpal = "0.13"
copy_dir = "0.1.2"
@ -109,13 +109,13 @@ rand = "0.8"
rand_chacha = "0.3"
rayon = "1.5"
rodio = {version = "0.14", default-features = false, features = ["vorbis"]}
ron = {version = "0.6", default-features = false}
ron = {version = "0.7", default-features = false}
serde = {version = "1.0", features = [ "rc", "derive" ]}
slab = "0.4.2"
strum = { version = "0.21", features = ["derive"] }
strum_macros = "0.21"
strum = { version = "0.23", features = ["derive"] }
strum_macros = "0.23"
treeculler = "0.2"
tokio = { version = "1.11", default-features = false, features = ["rt-multi-thread"] }
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
num_cpus = "1.0"
# vec_map = { version = "0.8.2" }
# inline_tweak = "1.0.2"

View File

@ -11,8 +11,8 @@ be-dyn-lib = []
[dependencies]
client = {package = "veloren-client", path = "../../client"}
common = {package = "veloren-common", path = "../../common"}
egui = "0.12"
egui_winit_platform = "0.8"
egui = "0.15"
egui_winit_platform = "0.11"
lazy_static = "1.4.0"
voxygen-dynlib = {package = "veloren-voxygen-dynlib", path = "../dynlib", optional = true}

View File

@ -14,8 +14,7 @@ use common::{
};
use core::mem;
use egui::{
plot::{Plot, Value},
widgets::plot::Curve,
plot::{Line, Plot, Value, Values},
CollapsingHeader, Color32, Grid, Pos2, ScrollArea, Slider, Ui, Window,
};
@ -262,13 +261,13 @@ pub fn maintain_egui_inner(
Window::new("🔧 Settings")
.open(&mut windows.egui_settings)
.scroll(true)
.vscroll(true)
.show(ctx, |ui| {
ctx.settings_ui(ui);
});
Window::new("🔍 Inspection")
.open(&mut windows.egui_inspection)
.scroll(true)
.vscroll(true)
.show(ctx, |ui| {
ctx.inspection_ui(ui);
});
@ -285,13 +284,13 @@ pub fn maintain_egui_inner(
.default_width(200.0)
.default_height(200.0)
.show(ctx, |ui| {
let plot = Plot::new("Frame Time").curve(Curve::from_values_iter(
let plot = Plot::new("Frame Time").line(Line::new(Values::from_values_iter(
egui_state
.frame_times
.iter()
.enumerate()
.map(|(i, x)| Value::new(i as f64, *x)),
));
)));
ui.add(plot);
});
@ -321,7 +320,7 @@ pub fn maintain_egui_inner(
.text("Cylinder height"),
);
let scroll_area = ScrollArea::from_max_height(800.0);
let scroll_area = ScrollArea::vertical().max_height(800.0);
let (_current_scroll, _max_scroll) = scroll_area.show(ui, |ui| {
Grid::new("entities_grid")
.spacing([40.0, 4.0])

View File

@ -6,7 +6,7 @@ pub(crate) fn filterable_list(
search_text: &str,
selected_index: &mut usize,
) {
let scroll_area = ScrollArea::auto_sized();
let scroll_area = ScrollArea::vertical();
scroll_area.show(ui, |ui| {
ui.spacing_mut().item_spacing = Vec2::new(0.0, 2.0);
let search_text = search_text.to_lowercase();
@ -27,7 +27,11 @@ pub(crate) fn filterable_list(
});
}
pub(crate) fn two_col_row(ui: &mut Ui, label: impl Into<Label>, content: impl Into<Label>) {
pub(crate) fn two_col_row(
ui: &mut Ui,
label: impl Into<Label> + core::fmt::Display,
content: impl Into<Label> + core::fmt::Display,
) {
ui.label(label);
ui.label(content);
ui.end_row();

View File

@ -17,7 +17,7 @@ deunicode = "1.0"
serde = { version = "1.0", features = ["derive"] }
tracing = "0.1"
# Diagnostic
ron = "0.6"
ron = "0.7"
git2 = { version = "0.13", default-features = false, optional = true }
# Binary

View File

@ -367,7 +367,7 @@ impl<'frame> Drawer<'frame> {
pub fn draw_egui(&mut self, platform: &mut Platform, scale_factor: f32) {
span!(guard, "Draw egui");
let (_output, paint_commands) = platform.end_frame();
let (_output, paint_commands) = platform.end_frame(None);
let paint_jobs = platform.context().tessellate(paint_commands);

View File

@ -34,16 +34,16 @@ arr_macro = "0.1.2"
packed_simd = { package = "packed_simd_2", version = "0.3.5", optional = true }
rayon = "1.5"
serde = { version = "1.0.110", features = ["derive"] }
ron = { version = "0.6", default-features = false }
ron = { version = "0.7", default-features = false }
# inline_tweak = "1.0.2"
# compression benchmarks
lz-fear = { version = "0.1.1", optional = true }
deflate = { version = "0.9.1", optional = true }
deflate = { version = "1.0.0", optional = true }
flate2 = { version = "1.0.20", optional = true }
num-traits = { version = "0.2", optional = true }
fallible-iterator = { version = "0.2.0", optional = true }
kiddo = { version = "0.1.5", optional = true }
kiddo = { version = "0.2.1", optional = true }
rstar = { version = "0.9", optional = true }
clap = { version = "2.33.3", optional = true }
@ -52,12 +52,12 @@ clap = { version = "2.33.3", optional = true }
common-frontend = { package = "veloren-common-frontend", path = "../common/frontend" }
criterion = "0.3"
csv = "1.1.3"
tracing-subscriber = { version = "0.2.15", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
minifb = "0.19.1"
rusqlite = { version = "0.24.2", features = ["array", "vtab", "bundled", "trace"] }
svg_fmt = "0.4"
structopt = "0.3"
strum = "0.21"
strum = "0.23"
[[bench]]
harness = false