Skip to content

Commit

Permalink
update deps (excluding bevy) (#624)
Browse files Browse the repository at this point in the history
As discussed in the discord I will defer updating bevy to its own PR.
(1/2) of point num 3 of #620 . I am not sure how to close all the
dependabot PRs.
  • Loading branch information
JackCrumpLeys authored Jun 25, 2024
1 parent 646a76e commit 4fb4fb6
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 96 deletions.
110 changes: 55 additions & 55 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ documentation = "https://docs.rs/valence/"
license = "MIT"

[workspace.dependencies]
aes = "0.8.2"
anyhow = { version = "1.0.70", features = ["backtrace"] }
aes = "0.8.4"
anyhow = { version = "1.0.86", features = ["backtrace"] }
approx = "0.5.1"
arrayvec = "0.7.2"
async-trait = "0.1.60"
arrayvec = "0.7.4"
async-trait = "0.1.80"
atty = "0.2.14"
base64 = "0.21.0"
base64 = "0.22.1"
bevy_app = { version = "0.12", default-features = false }
bevy_derive = "0.12"
bevy_ecs = { version = "0.12", default-features = false, features = [
Expand All @@ -122,65 +122,65 @@ bevy_hierarchy = { version = "0.12", default-features = false }
bevy_log = { version = "0.12" }
bevy_mod_debugdump = { version = "0.9.0", default-features = false }
bevy_utils = { version = "0.12" }
bitfield-struct = "0.5.3"
bitfield-struct = "0.8.0"
bitvec = "1.0.1"
byteorder = "1.4.3"
bytes = "1.2.1"
byteorder = "1.5.0"
bytes = "1.6.0"
cesu8 = "1.1.0"
cfb8 = "0.8.1"
clap = { version = "4.0.30", features = ["derive"] }
derive_more = "1.0.0-beta.3"
directories = "5.0.0"
clap = { version = "4.5.7", features = ["derive"] }
derive_more = "1.0.0-beta.6"
directories = "5.0.1"
divan = "0.1.14"
eframe = { version = "0.22.0", default-features = false }
egui = "0.22.0"
egui_dock = "0.6"
flate2 = "1.0.24"
eframe = { version = "0.27.2" }
egui = "0.27.2"
egui_dock = "0.12"
flate2 = "1.0.30"
flume = "0.11.0"
fs_extra = "1.2.0"
glam = "0.26.0"
heck = "0.5.0-rc.1"
fs_extra = "1.3.0"
glam = "0.28.0"
heck = "0.5.0"
hmac = "0.12.1"
image = "0.24.6"
indexmap = "2.2.1"
itertools = "0.12.0"
image = "0.25.1"
indexmap = "2.2.6"
itertools = "0.13.0"
java_string = { path = "crates/java_string", version = "0.1.2" }
lru = "0.12.0"
noise = "0.8.2"
num = "0.4.0"
num-bigint = "0.4.3"
owo-colors = "3.5.0"
ordered-float = "4.1.1"
parking_lot = "0.12.1"
paste = "1.0.11"
petgraph = "0.6.3"
pretty_assertions = "1.3.0"
proc-macro2 = "1.0.56"
quote = "1.0.26"
lru = "0.12.3"
noise = "0.9.0"
num = "0.4.3"
num-bigint = "0.4.5"
owo-colors = "4.0.0"
ordered-float = "4.2.0"
parking_lot = "0.12.3"
paste = "1.0.15"
petgraph = "0.6.5"
pretty_assertions = "1.4.0"
proc-macro2 = "1.0.86"
quote = "1.0.36"
rand = "0.8.5"
rayon = "1.7.0"
regex = "1.6.0"
reqwest = { version = "0.11.12", default-features = false }
rfd = "0.11.3"
rsa = "0.9.2"
rayon = "1.10.0"
regex = "1.10.5"
reqwest = { version = "0.12.5", default-features = false }
rfd = "0.14.1"
rsa = "0.9.6"
rsa-der = "0.3.0"
rustc-hash = "1.1.0"
serde = "1.0.160"
rustc-hash = "2.0.0"
serde = "1.0.203"
serde-value = "0.7.0"
serde_json = "1.0.96"
sha1 = "0.10.5"
sha2 = "0.10.6"
syn = "2.0.15"
syntect = { version = "5.0.0", default-features = false }
tempfile = "3.3.0"
thiserror = "1.0.40"
time = "0.3.17"
tokio = { version = "1.27.0", features = ["full"] }
toml = "0.7.2"
tracing = "0.1.37"
tracing-subscriber = "0.3.16"
url = { version = "2.2.2", features = ["serde"] }
uuid = "1.3.1"
serde_json = "1.0.117"
sha1 = "0.10.6"
sha2 = "0.10.8"
syn = "2.0.67"
syntect = { version = "5.2.0", default-features = false }
tempfile = "3.10.1"
thiserror = "1.0.61"
time = "0.3.36"
tokio = { version = "1.38.0", features = ["full"] }
toml = "0.8.14"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
url = { version = "2.5.2", features = ["serde"] }
uuid = "1.8.0"
valence = { path = ".", version = "0.2.0-alpha.1" }
valence_advancement = { path = "crates/valence_advancement", version = "0.2.0-alpha.1" }
valence_anvil = { path = "crates/valence_anvil", version = "0.1.0" }
Expand Down Expand Up @@ -209,7 +209,7 @@ valence_server_common = { path = "crates/valence_server_common", version = "0.2.
valence_text = { path = "crates/valence_text", version = "0.2.0-alpha.1" }
valence_weather = { path = "crates/valence_weather", version = "0.2.0-alpha.1" }
valence_world_border = { path = "crates/valence_world_border", version = "0.2.0-alpha.1" }
zip = "0.6.3"
zip = "2.1.3"

[workspace.lints.rust]
# missing_debug_implementations = "warn" # TODO: enable me.`
Expand Down
8 changes: 4 additions & 4 deletions crates/java_string/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# java_string
# `java_string`

An implementation of Java strings, tolerant of invalid UTF-16 encoding.
This allows for round-trip serialization of all Java strings, including those which contain invalid UTF-16, while still
being able to perform useful operations on those strings.
being able to perform useful operations on those strings.

These Java strings use the UTF-8 encoding, with the modification that surrogate code points (code points between U+D800
These Java strings use the UTF-8 encoding, with the modification that surrogate code points (code points between U+D800
and U+DFFF inclusive) are allowed. This allows for zero-cost conversion from Rust strings to Java strings. This modified
encoding is known as "semi-UTF-8" throughout the codebase. Similarly, this crate introduces a `JavaCodePoint` type which
is analogous to `char`, except that surrogate code points are allowed.
Expand All @@ -14,4 +14,4 @@ strings. Please refer to the `std` documentation.

# Features

- `serde` Adds support for [`serde`](https://docs.rs/serde/latest/serde/)
- `serde` Adds support for [`serde`](https://docs.rs/serde/latest/serde/)
2 changes: 1 addition & 1 deletion crates/java_string/src/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl JavaCodePoint {
pub const fn as_u32(self) -> u32 {
unsafe {
// SAFETY: JavaCodePoint has the same repr as a u32
let result = std::mem::transmute(self);
let result = std::mem::transmute::<Self, u32>(self);

if result > 0x10ffff {
// SAFETY: JavaCodePoint can never have a value > 0x10FFFF.
Expand Down
2 changes: 1 addition & 1 deletion tools/dump_schedule/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# dump_schedule
# `dump_schedule`

A simple debugging utility for visualizing Valence's schedule graph. Generates a SVG file.

Expand Down
15 changes: 9 additions & 6 deletions tools/packet_inspector/src/app.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::net::SocketAddr;
use std::sync::{Arc, RwLock};

use egui_dock::{DockArea, NodeIndex, Style, Tree};
use egui_dock::{DockArea, DockState, NodeIndex, Style};
use packet_inspector::Proxy;
use tokio::task::JoinHandle;

Expand Down Expand Up @@ -48,7 +48,7 @@ impl egui_dock::TabViewer for TabViewer {
}

pub(crate) struct GuiApp {
tree: Tree<Box<dyn Tab>>,
tree: DockState<Box<dyn Tab>>,
shared_state: Arc<RwLock<SharedState>>,
tab_viewer: TabViewer,
}
Expand All @@ -58,16 +58,19 @@ impl GuiApp {
let ctx = cc.egui_ctx.clone();

// Default Application Layout
let mut tree: Tree<Box<dyn Tab>> = Tree::new(vec![Box::new(connection::Connection::new())]);
let mut tree: DockState<Box<dyn Tab>> =
DockState::new(vec![Box::new(connection::Connection::new())]);

let [a, b] = tree.split_right(
let [a, b] = tree.main_surface_mut().split_right(
NodeIndex::root(),
0.3,
vec![Box::new(packet_list::PacketList::new())],
);

let [_, _] = tree.split_below(a, 0.25, vec![Box::new(filter::Filter::new())]);
let [_, _] = tree.split_below(
let [_, _] =
tree.main_surface_mut()
.split_below(a, 0.25, vec![Box::new(filter::Filter::new())]);
let [_, _] = tree.main_surface_mut().split_below(
b,
0.5,
vec![
Expand Down
26 changes: 10 additions & 16 deletions tools/packet_inspector/src/app/packet_list.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use eframe::epaint::{PathShape, RectShape};
use eframe::epaint::PathShape;
use egui::{
Color32, Pos2, Rect, Response, Rgba, Rounding, Sense, Shape, Stroke, TextStyle, Ui, Vec2,
WidgetText,
Color32, Pos2, Rect, Response, Rgba, Sense, Shape, Stroke, TextStyle, Ui, Vec2, WidgetText,
};
use packet_inspector::Packet;
use valence_protocol::PacketSide;
Expand Down Expand Up @@ -148,12 +147,8 @@ fn draw_packet_widget(ui: &mut Ui, packet: &Packet, selected: bool) -> Response
};

if ui.is_rect_visible(rect) {
ui.painter().add(Shape::Rect(RectShape {
rect,
rounding: Rounding::none(),
fill: fill.into(),
stroke: Stroke::new(1.0, Rgba::BLACK),
}));
ui.painter()
.rect(rect, 0.0, fill, Stroke::new(1.0, Rgba::BLACK));

let shape = get_triangle(packet.side, &rect);
ui.painter().add(Shape::Path(shape));
Expand All @@ -176,34 +171,33 @@ fn draw_packet_widget(ui: &mut Ui, packet: &Packet, selected: bool) -> Response
ui.visuals().weak_text_color()
};

identifier.paint_with_fallback_color(
ui.painter(),
ui.painter().galley(
Pos2 {
x: rect.left() + 21.0,
y: rect.top() + 6.0,
},
identifier,
id_and_timestamp_color,
);

rect.set_width(rect.width() - 5.0);

let label_width = label.size().x + 50.0;

label.paint_with_fallback_color(
&ui.painter().with_clip_rect(rect),
ui.painter().galley(
Pos2 {
x: rect.left() + 55.0,
y: rect.top() + 6.0,
},
label,
text_color,
);

timestamp.paint_with_fallback_color(
&ui.painter().with_clip_rect(rect),
ui.painter().galley(
Pos2 {
x: rect.left() + label_width + 8.0,
y: rect.top() + 6.0,
},
timestamp,
id_and_timestamp_color,
);
}
Expand Down
12 changes: 7 additions & 5 deletions tools/packet_inspector/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

use egui::{IconData, ViewportBuilder};

mod tri_checkbox;

mod app;
Expand All @@ -8,9 +10,9 @@ mod shared_state;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let native_options = eframe::NativeOptions {
icon_data: Some(load_icon()),
initial_window_size: Some(egui::Vec2::new(1024.0, 768.0)),
decorated: true,
viewport: ViewportBuilder::default()
.with_inner_size(egui::Vec2::new(1024.0, 768.0))
.with_icon(load_icon()),
..Default::default()
};

Expand All @@ -27,7 +29,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}

fn load_icon() -> eframe::IconData {
fn load_icon() -> IconData {
let (icon_rgba, icon_width, icon_height) = {
let icon = include_bytes!("../../../assets/logo-256x256.png");
let image = image::load_from_memory(icon)
Expand All @@ -38,7 +40,7 @@ fn load_icon() -> eframe::IconData {
(rgba, width, height)
};

eframe::IconData {
IconData {
rgba: icon_rgba,
width: icon_width,
height: icon_height,
Expand Down
15 changes: 8 additions & 7 deletions tools/packet_inspector/src/tri_checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ impl<'a> Widget for TriCheckbox<'a> {
// let visuals = ui.style().interact_selectable(&response, *checked);
let visuals = ui.style().interact(&response);
let (small_icon_rect, big_icon_rect) = ui.spacing().icon_rectangles(rect);
ui.painter().add(epaint::RectShape {
rect: big_icon_rect.expand(visuals.expansion),
rounding: visuals.rounding,
fill: visuals.bg_fill,
stroke: visuals.bg_stroke,
});
ui.painter().add(epaint::RectShape::new(
big_icon_rect.expand(visuals.expansion),
visuals.rounding,
visuals.bg_fill,
visuals.bg_stroke,
));

match *checked {
TriCheckboxState::Enabled => {
Expand Down Expand Up @@ -125,7 +125,8 @@ impl<'a> Widget for TriCheckbox<'a> {
rect.min.x + icon_width + icon_spacing,
rect.center().y - 0.5 * text.size().y,
);
text.paint_with_visuals(ui.painter(), text_pos, visuals);

ui.painter().galley(text_pos, text, visuals.text_color());
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/playground/src/playground.template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::extras::*;

const SPAWN_Y: i32 = 64;

pub fn build_app(app: &mut App) {
pub(crate) fn build_app(app: &mut App) {
app.insert_resource(NetworkSettings {
connection_mode: ConnectionMode::Offline,
..Default::default()
Expand Down

0 comments on commit 4fb4fb6

Please sign in to comment.