Merge branch 'xMAC94x/increase_compile_time' into 'master'

dependency reduction:

See merge request veloren/veloren!1063
This commit is contained in:
Marcel 2020-06-11 22:19:26 +00:00
commit 2802e8f6b1
12 changed files with 409 additions and 1052 deletions

3
.gitlab/CODEOWNERS Normal file
View File

@ -0,0 +1,3 @@
*/Cargo.toml @xMAC94x
Cargo.toml @xMAC94x
rust-toolchain @xMAC94x

1305
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,10 +9,10 @@ common = { package = "veloren-common", path = "../common", features = ["no-asset
byteorder = "1.3.2"
uvth = "3.1.1"
image = "0.22.3"
image = { version = "0.22.3", default-features = false, features = ["png"] }
num_cpus = "1.10.1"
log = "0.4.8"
specs = "0.15.1"
vek = { version = "0.10.0", features = ["serde"] }
hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" }
vek = { version = "0.11.0", features = ["serde"] }
hashbrown = { version = "0.6", features = ["rayon", "serde", "nightly"] }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "223a4097f7ebc8d451936dccb5e6517194bbf086" }

View File

@ -11,30 +11,28 @@ no-assets = []
specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git" }
specs = { version = "0.15.1", features = ["serde", "nightly", "storage-event-control"] }
vek = { version = "0.10.0", features = ["serde"] }
dot_vox = "4.0.0"
fxhash = "0.2.1"
image = "0.22.3"
mio = "0.6.19"
mio-extras = "2.0.5"
serde = "1.0.102"
serde_derive = "1.0.102"
vek = { version = "0.11.0", features = ["serde"] }
dot_vox = "4.0"
image = { version = "0.22.3", default-features = false, features = ["png"] }
mio = "0.6"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0.41"
ron = "0.5.1"
ron = { version = "0.6", default-features = false }
bincode = "1.2.0"
log = "0.4.8"
rand = "0.7.2"
rand = "0.7"
rayon = "^1.3.0"
lazy_static = "1.4.0"
lz4-compress = "0.1.1"
hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] }
hashbrown = { version = "0.6", features = ["rayon", "serde", "nightly"] }
find_folder = "0.3.0"
parking_lot = "0.9.0"
crossbeam = "=0.7.2"
crossbeam = "0.7"
notify = "5.0.0-pre.2"
indexmap = "1.3.0"
sum_type = "0.2.0"
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "223a4097f7ebc8d451936dccb5e6517194bbf086" }
[dev-dependencies]
criterion = "0.3"

View File

@ -12,7 +12,7 @@ edition = "2018"
bincode = "1.2"
serde = { version = "1.0" }
#sending
async-std = { version = "~1.5", features = ["std"] }
async-std = { version = "~1.5", default-features = false, features = ["std", "async-task", "default"] }
#tracing and metrics
tracing = { version = "0.1", default-features = false }
tracing-futures = "0.2"
@ -25,4 +25,4 @@ rand = { version = "0.7" }
[dev-dependencies]
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec"] }
uvth = { version = "3.1", default-features = false }
uvth = { version = ">= 3.0, <= 4.0", default-features = false }

View File

@ -16,23 +16,23 @@ specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git" }
log = "0.4.8"
specs = { version = "0.15.1", features = ["shred-derive"] }
vek = "0.10.0"
vek = "0.11.0"
uvth = "3.1.1"
lazy_static = "1.4.0"
scan_fmt = "0.2.4"
ron = "0.5.1"
serde = "1.0.102"
serde_derive = "1.0.102"
ron = { version = "0.6", default-features = false }
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
rand = { version = "0.7.2", features = ["small_rng"] }
rand = { version = "0.7", features = ["small_rng"] }
chrono = "0.4.9"
hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] }
hashbrown = { version = "0.6", features = ["rayon", "serde", "nightly"] }
crossbeam = "=0.7.2"
prometheus = "0.7"
prometheus = { version = "0.7", default-features = false}
prometheus-static-metric = "0.2"
rouille = "3.0.0"
portpicker = { git = "https://github.com/wusyong/portpicker-rs", branch = "fix_ipv6" }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" }
tiny_http = "0.7.0"
portpicker = { git = "https://github.com/xMAC94x/portpicker-rs" }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "223a4097f7ebc8d451936dccb5e6517194bbf086" }
libsqlite3-sys = { version = "0.9.1", features = ["bundled"] }
diesel = { version = "1.4.3", features = ["sqlite"] }
diesel_migrations = "1.4.0"

View File

@ -1,6 +1,5 @@
use log::info;
use log::{debug, error};
use prometheus::{Encoder, Gauge, IntGauge, IntGaugeVec, Opts, Registry, TextEncoder};
use rouille::{router, Server};
use std::{
convert::TryInto,
error::Error,
@ -135,25 +134,35 @@ impl ServerMetrics {
//TODO: make this a job
self.handle = Some(thread::spawn(move || {
let server = Server::new(addr, move |request| {
router!(request,
(GET) (/metrics) => {
let encoder = TextEncoder::new();
let mut buffer = vec![];
let mf = registry.gather();
encoder.encode(&mf, &mut buffer).expect("Failed to encoder metrics text.");
rouille::Response::text(String::from_utf8(buffer).expect("Failed to parse bytes as a string."))
},
_ => rouille::Response::empty_404()
)
})
.expect("Failed to start server");
info!("Started server metrics: {}", addr);
let server = tiny_http::Server::http(addr).unwrap();
const TIMEOUT: Duration = Duration::from_secs(1);
debug!("starting tiny_http server to serve metrics");
while running2.load(Ordering::Relaxed) {
server.poll();
// Poll at 10Hz
thread::sleep(Duration::from_millis(100));
let request = match server.recv_timeout(TIMEOUT) {
Ok(Some(rq)) => rq,
Ok(None) => continue,
Err(e) => {
println!("error: {}", e);
break;
},
};
let mf = registry.gather();
let encoder = TextEncoder::new();
let mut buffer = vec![];
encoder
.encode(&mf, &mut buffer)
.expect("Failed to encoder metrics text.");
let response = tiny_http::Response::from_string(
String::from_utf8(buffer).expect("Failed to parse bytes as a string."),
);
if let Err(e) = request.respond(response) {
error!(
"The metrics HTTP server had encountered and error with answering, {}",
e
);
}
}
debug!("stopping tiny_http server to serve metrics");
}));
Ok(())
}

View File

@ -27,14 +27,14 @@ glutin = "0.21.1"
winit = { version = "0.19.4", features = ["serde"] }
conrod_core = { git = "https://gitlab.com/veloren/conrod.git", branch = "pre-winit-20" }
conrod_winit = { git = "https://gitlab.com/veloren/conrod.git", branch = "pre-winit-20" }
euc = "0.3.0"
euc = { git = "https://github.com/zesterer/euc.git" }
# ECS
specs = "0.15.1"
specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git" }
# Mathematics
vek = { version = "0.10.0", features = ["serde"] }
vek = { version = "0.11.0", features = ["serde"] }
# Controller
gilrs = { version = "0.7", features = ["serde"] }
@ -46,28 +46,28 @@ server = { package = "veloren-server", path = "../server", optional = true }
glsl-include = "0.3.1"
failure = "0.1.6"
log = "0.4.8"
dot_vox = "4.0.0"
image = "0.22.3"
serde = "1.0.102"
serde_derive = "1.0.102"
ron = "0.5.1"
dot_vox = "4.0"
image = { version = "0.22.5", default-features = false, features = ["ico", "png"] }
serde = "1.0"
serde_derive = "1.0"
ron = { version = "0.6", default-features = false }
guillotiere = { git = "https://github.com/Imberflur/guillotiere" }
fern = { version = "0.5.8", features = ["colored"] }
msgbox = { git = "https://github.com/bekker/msgbox-rs.git", rev = "68fe39a", optional = true }
msgbox = { git = "https://github.com/bekker/msgbox-rs.git", default-features = false, rev = "68fe39a", optional = true }
directories = "2.0.2"
num = "0.2.0"
backtrace = "0.3.40"
rand = "0.7.2"
rand = "0.7"
treeculler = { git = "https://gitlab.com/yusdacra/treeculler.git" }
rodio = { version = "0.10", default-features = false, features = ["wav", "vorbis"] }
cpal = "0.10"
crossbeam = "=0.7.2"
hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] }
hashbrown = { version = "0.6", features = ["rayon", "serde", "nightly"] }
chrono = "0.4.9"
bincode = "1.2"
deunicode = "1.0"
uvth = "3.1.1"
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "223a4097f7ebc8d451936dccb5e6517194bbf086" }
const-tweaker = { version = "0.2.5", optional = true }
[target.'cfg(target_os = "macos")'.dependencies]

View File

@ -121,10 +121,9 @@ impl PlayState for MainMenuState {
localized_strings.get("common.fatal_error"),
e
),
client::AuthClientError::RequestError(_) => format!(
"{}: {}",
localized_strings.get("main.login.failed_sending_request"),
e
client::AuthClientError::RequestError() => format!(
"{}",
localized_strings.get("main.login.failed_sending_request")
),
client::AuthClientError::ServerError(_, e) => format!("{}", e),
},

View File

@ -2023,6 +2023,7 @@ impl<V: RectRasterableVol> Terrain<V> {
})
.min_by_key(|todo| todo.active_worker.unwrap_or(todo.started_tick))
{
// TODO: find a alternative!
if scene_data.thread_pool.queued_jobs() > 0 {
break;
}

View File

@ -92,10 +92,10 @@ impl<'a> Pipeline for Voxel {
//norm: _,
ao_level,
}: &Self::Vertex,
) -> ([f32; 3], Self::VsOut) {
) -> ([f32; 4], Self::VsOut) {
let light = Rgba::from_opaque(Rgb::from(*ao_level as f32 / 4.0 + 0.25));
let color = light * srgba_to_linear(Rgba::from_opaque(*col));
let position = (self.mvp * Vec4::from_point(*pos)).xyz().into_array();
let position = (self.mvp * Vec4::from_point(*pos)).into_array();
(position, VsOut(color))
}
@ -175,7 +175,7 @@ pub fn draw_vox(
Voxel { mvp }.draw::<rasterizer::Triangles<_>, _>(
&generate_mesh(segment, Vec3::from(0.0)),
&mut color,
&mut depth,
Some(&mut depth),
);
let rgba_img = RgbaImage::from_vec(

View File

@ -9,24 +9,24 @@ bincode = "1.2.0"
common = { package = "veloren-common", path = "../common" }
bitvec = "0.17.4"
fxhash = "0.2.1"
image = "0.22.3"
image = { version = "0.22.3", default-features = false, features = ["png"] }
itertools = "0.8.2"
vek = "0.10.0"
vek = "0.11.0"
noise = { version = "0.6.0", default-features = false }
num = "0.2.0"
ordered-float = "1.0"
hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] }
hashbrown = { version = "0.6", features = ["rayon", "serde", "nightly"] }
lazy_static = "1.4.0"
log = "0.4.8"
rand = "0.7.2"
rand = "0.7"
rand_chacha = "0.2.1"
arr_macro = "0.1.2"
packed_simd = "0.3.3"
rayon = "^1.3.0"
roots = "0.0.5"
serde = "1.0.102"
serde_derive = "1.0.102"
ron = "0.5.1"
serde = "1.0"
serde_derive = "1.0"
ron = { version = "0.6", default-features = false }
[dev-dependencies]
pretty_env_logger = "0.3.0"