Skip to content

Commit eb1e40e

Browse files
authored
Update crates and cleanup dependencies (#22)
1 parent 7a25483 commit eb1e40e

File tree

8 files changed

+2639
-1895
lines changed

8 files changed

+2639
-1895
lines changed

Cargo.lock

Lines changed: 2599 additions & 1845 deletions
Large diffs are not rendered by default.

Cargo.toml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,46 +20,39 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
2020
[dependencies]
2121
anyhow = "1.0.100"
2222
bytes = "1.10.1"
23-
chrono = { version = "0.4.42", features = ["serde"] }
24-
dify = "0.7.4"
25-
eframe = { version = "0.33.0", features = ["glow", "default", "persistence", "ron"] }
26-
egui_extras = { version = "0.33.0", features = ["image", "file", "http"] }
27-
egui_inbox = { version = "0.10.0", features = ["async", "tokio"] }
28-
ehttp = { version = "0.5.0", features = ["native-async"] }
23+
dify = "0.8.0"
24+
eframe = { version = "0.34.1", features = ["glow", "default", "persistence", "ron"] }
25+
egui_extras = { version = "0.34.1", features = ["image", "file", "http"] }
26+
egui_inbox = { version = "0.11.0", features = ["async", "tokio"] }
2927
env_logger = { version = "0.11.8", default-features = false, features = ["auto-color", "humantime"] }
3028
flate2 = { version = "1.1" }
3129
futures = "0.3.31"
32-
getrandom = { version = "0.3", features = ["wasm_js"] }
33-
graphql_client = "0.14.0"
34-
hello_egui_utils = "0.10.0"
30+
graphql_client = "0.16.0"
31+
hello_egui_utils = "0.11.0"
3532
image = "0.25.8"
3633
log = "0.4.28"
37-
octocrab = { version = "0.47.0", default-features = false, features = ["stream"] }
34+
octocrab = { version = "0.49.7", default-features = false, features = ["stream", "jwt-rust-crypto"] }
3835
octocrab-wasm = { path = "crates/octocrab-wasm" }
3936
re_ui = { git = "https://github.com/rerun-io/rerun", branch = "main" }
40-
reqwest = { version = "0.12.23", default-features = false, features = [
41-
"rustls-tls", "rustls-tls-webpki-roots"
42-
] }
37+
reqwest = { version = "0.13.2", default-features = false, features = [] }
4338
serde = "1.0"
4439
serde_json = "1.0"
4540
serde_urlencoded = "0.7.1"
4641
tar = { version = "0.4.44" }
47-
tempfile = { version = "3.23" }
48-
thiserror = "2.0.17"
49-
web-time = "1.1"
50-
zip = { version = "6.0.0", default-features = false, features = ["deflate"] }
42+
zip = { version = "8.5.1", default-features = false, features = ["deflate"] }
5143

5244
# native:
5345
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
5446
axum = "0.8.6"
5547
clap = { version = "4.5", features = ["derive"] }
5648
env_logger = "0.11.8"
57-
gix = { version = "0.73", default-features = false, features = ["blocking-network-client", "blob-diff", "merge"] }
49+
gix = { version = "0.81", default-features = false, features = ["blocking-network-client", "blob-diff", "merge", "sha1"] }
5850
ignore = { version = "0.4" }
5951
tokio = { version = "1.47", features = ["full"] }
6052

6153
# web:
6254
[target.'cfg(target_arch = "wasm32")'.dependencies]
55+
getrandom = { version = "0.3", features = ["wasm_js"] }
6356
js-sys = { version = "0.3.81" }
6457
wasm-bindgen = { version = "0.2.104" }
6558
wasm-bindgen-futures = { version = "0.4.54" }
@@ -146,7 +139,7 @@ doc_include_without_cfg = "warn"
146139
doc_link_with_quotes = "warn"
147140
doc_markdown = "warn"
148141
elidable_lifetime_names = "warn"
149-
empty_enum = "warn"
142+
empty_enums = "warn"
150143
empty_enum_variants_with_brackets = "warn"
151144
empty_line_after_outer_attr = "warn"
152145
enum_glob_use = "warn"
@@ -258,7 +251,6 @@ string_add = "warn"
258251
string_add_assign = "warn"
259252
string_lit_as_bytes = "warn"
260253
string_lit_chars_any = "warn"
261-
string_to_string = "warn"
262254
suspicious_command_arg_space = "warn"
263255
suspicious_xor_used_as_pow = "warn"
264256
todo = "warn"
@@ -268,7 +260,7 @@ trailing_empty_array = "warn"
268260
trait_duplication_in_bounds = "warn"
269261
transmute_ptr_to_ptr = "warn"
270262
tuple_array_conversions = "warn"
271-
unchecked_duration_subtraction = "warn"
263+
unchecked_time_subtraction = "warn"
272264
undocumented_unsafe_blocks = "warn"
273265
unimplemented = "warn"
274266
uninhabited_references = "warn"

crates/octocrab-wasm/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
octocrab = { version = "0.47.0", default-features = false }
7+
octocrab = { version = "0.49.7", default-features = false, features = ["jwt-rust-crypto"] }
88

99
[target.'cfg(target_arch = "wasm32")'.dependencies]
1010
http-body = "1.0.1"
@@ -14,10 +14,8 @@ http-body-util = "0.1.3"
1414
bytes = "1.10"
1515
wasm-bindgen-futures = "0.4.54"
1616
futures = "0.3.31"
17-
reqwest = { version = "0.12.23", default-features = false, features = [
18-
"rustls-tls",
19-
] }
17+
reqwest = { version = "0.13.2", default-features = false, features = [] }
2018
thiserror = "2.0"
2119

2220
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
23-
octocrab = { version = "0.47.0", features = ["default-client"] }
21+
octocrab = { version = "0.49.7", features = ["default-client"] }

src/app.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::settings::Settings;
33
use crate::state::{AppState, AppStateRef, PageRef, SystemCommand, ViewerSystemCommand};
44
use crate::{DiffSource, bar, home, viewer};
55
use crate::{config::Config, state::View};
6-
use eframe::egui::{Context, Modifiers};
6+
use eframe::egui::{Context, Modifiers, Ui};
77
use eframe::{Frame, Storage, egui};
88
use egui_extras::install_image_loaders;
99
use egui_inbox::UiInbox;
@@ -52,29 +52,30 @@ impl eframe::App for App {
5252
eframe::set_value(storage, eframe::APP_KEY, &self.state.persist());
5353
}
5454

55-
fn update(&mut self, ctx: &Context, _frame: &mut Frame) {
56-
self.state.update(ctx);
57-
self.inbox.read(ctx).for_each(|cmd| {
58-
self.state.handle(ctx, cmd);
55+
fn ui(&mut self, ui: &mut Ui, _frame: &mut Frame) {
56+
let ctx = ui.ctx().clone();
57+
self.state.update(&ctx);
58+
self.inbox.read(&ctx).for_each(|cmd| {
59+
self.state.handle(&ctx, cmd);
5960
});
6061

6162
{
6263
let state_ref = self
6364
.state
64-
.reference(ctx, &self.diff_loader, self.inbox.sender());
65+
.reference(&ctx, &self.diff_loader, self.inbox.sender());
6566

66-
bar::bar(ctx, &state_ref);
67+
bar::bar(ui, &state_ref);
6768

6869
match &state_ref.page {
6970
PageRef::Home => {
70-
home::home_view(ctx, &state_ref);
71+
home::home_view(ui, &state_ref);
7172
}
7273
PageRef::DiffViewer(diff) => {
73-
viewer::viewer_ui(ctx, &diff.with_app(&state_ref));
74+
viewer::viewer_ui(ui, &diff.with_app(&state_ref));
7475
}
7576
}
7677

77-
Self::end_frame(ctx, &state_ref);
78+
Self::end_frame(&ctx, &state_ref);
7879
}
7980

8081
// for file in &ctx.input(|i| i.raw.dropped_files.clone()) {

src/bar.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use crate::github::auth::GithubAuthCommand;
22
use crate::state::AppStateRef;
33
use eframe::egui;
4-
use eframe::egui::{Context, Popup, Ui};
4+
use eframe::egui::{Popup, Ui};
55

6-
pub fn bar(ctx: &Context, state: &AppStateRef<'_>) {
7-
egui::TopBottomPanel::top("top bar")
6+
pub fn bar(ui: &mut Ui, state: &AppStateRef<'_>) {
7+
egui::Panel::top("top bar")
88
.resizable(false)
9-
.show(ctx, |ui| {
9+
.show_inside(ui, |ui| {
1010
egui::Sides::new().show(
1111
ui,
1212
|_ui| {},

src/home.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use crate::DiffSource;
22
use crate::state::{AppStateRef, SystemCommand};
33
use eframe::egui;
4-
use eframe::egui::{CentralPanel, Context, Id, TextEdit};
4+
use eframe::egui::{CentralPanel, Id, TextEdit, Ui};
55

6-
pub fn home_view(ctx: &Context, app: &AppStateRef<'_>) {
7-
CentralPanel::default().show(ctx, |ui| {
6+
pub fn home_view(ui: &mut Ui, app: &AppStateRef<'_>) {
7+
CentralPanel::default().show_inside(ui, |ui| {
88
ui.heading("Kitdiff");
99

1010
ui.horizontal(|ui| {

src/native_loaders/git_loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ fn run_git_discovery(sender: &Sender, base_path: &Path) -> anyhow::Result<()> {
226226
}
227227
}
228228
}
229-
Ok(gix::object::tree::diff::Action::Continue)
229+
Ok(gix::object::tree::diff::Action::Continue(()))
230230
},
231231
)?;
232232

src/viewer/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ mod viewer_options;
44

55
use crate::state::ViewerAppStateRef;
66
use eframe::egui;
7-
use eframe::egui::Context;
8-
use eframe::egui::panel::Side;
7+
use eframe::egui::Ui;
98

10-
pub fn viewer_ui(ctx: &Context, state: &ViewerAppStateRef<'_>) {
11-
egui::SidePanel::new(Side::Left, "files").show(ctx, |ui| {
9+
pub fn viewer_ui(ui: &mut Ui, state: &ViewerAppStateRef<'_>) {
10+
egui::Panel::left("files").show_inside(ui, |ui| {
1211
file_tree::file_tree(ui, state);
1312
});
1413

15-
egui::SidePanel::right("options").show(ctx, |ui| {
14+
egui::Panel::right("options").show_inside(ui, |ui| {
1615
ui.set_width(ui.available_width());
1716

1817
viewer_options::viewer_options(ui, state);
@@ -152,7 +151,7 @@ pub fn viewer_ui(ctx: &Context, state: &ViewerAppStateRef<'_>) {
152151
// });
153152
});
154153

155-
egui::CentralPanel::default().show(ctx, |ui| {
154+
egui::CentralPanel::default().show_inside(ui, |ui| {
156155
diff_view::diff_view(ui, state);
157156
});
158157
}

0 commit comments

Comments
 (0)