From 398b6ef7b5e825b5de7e635e13cb015bd3a872be Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 20 Dec 2025 07:14:35 +0000 Subject: [PATCH 1/7] fix(deps): update rust crate tower-http to 0.6.0 --- server/Cargo.lock | 17 ++++------------- server/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/server/Cargo.lock b/server/Cargo.lock index 748c2b5..c312c0d 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -391,12 +391,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - [[package]] name = "httparse" version = "1.10.1" @@ -1153,17 +1147,14 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.4" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "bitflags 2.10.0", "bytes", - "futures-core", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "http-range-header", + "http 1.4.0", + "http-body 1.0.1", "pin-project-lite", "tower-layer", "tower-service", diff --git a/server/Cargo.toml b/server/Cargo.toml index b22e536..d9d1482 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -16,5 +16,5 @@ tracing = "0.1.37" anyhow = "1.0.82" envy = "0.4.2" serde = "1.0.198" -tower-http = { version = "0.4.0", features = ["trace"] } +tower-http = { version = "0.6.0", features = ["trace"] } indexmap = "2.0.0" From 0f5a47ba3d1ea98b168369a31d25304399ac3ee8 Mon Sep 17 00:00:00 2001 From: Lucky3028 <24449974+Lucky3028@users.noreply.github.com> Date: Sat, 20 Dec 2025 16:32:20 +0900 Subject: [PATCH 2/7] feat(deps): upgrade axum to v0.8 --- server/Cargo.lock | 312 ++++++++------------------------------------- server/Cargo.toml | 2 +- server/build.rs | 30 +++-- server/src/main.rs | 21 ++- 4 files changed, 77 insertions(+), 288 deletions(-) diff --git a/server/Cargo.lock b/server/Cargo.lock index c312c0d..77bf136 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -46,78 +46,37 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core 0.3.4", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "itoa", - "matchit 0.7.3", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "tokio", - "tower 0.4.13", - "tower-layer", - "tower-service", -] - [[package]] name = "axum" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" dependencies = [ - "axum-core 0.5.5", + "axum-core", "bytes", + "form_urlencoded", "futures-util", - "http 1.4.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", + "hyper", + "hyper-util", "itoa", - "matchit 0.8.4", + "matchit", "memchr", "mime", "percent-encoding", "pin-project-lite", "serde_core", - "sync_wrapper 1.0.2", - "tower 0.5.2", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -128,14 +87,15 @@ checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" dependencies = [ "bytes", "futures-core", - "http 1.4.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -144,12 +104,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.10.0" @@ -316,7 +270,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.4.0", + "http", "indexmap", "slab", "tokio", @@ -336,17 +290,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.4.0" @@ -357,17 +300,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -375,7 +307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.4.0", + "http", ] [[package]] @@ -386,8 +318,8 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.4.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -403,29 +335,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.8.1" @@ -437,8 +346,8 @@ dependencies = [ "futures-channel", "futures-core", "h2", - "http 1.4.0", - "http-body 1.0.1", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -455,7 +364,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.8.1", + "hyper", "hyper-util", "pin-project-lite", "tokio", @@ -472,12 +381,12 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "http 1.4.0", - "http-body 1.0.1", - "hyper 1.8.1", + "http", + "http-body", + "hyper", "libc", "pin-project-lite", - "socket2 0.6.1", + "socket2", "tokio", "tower-service", "tracing", @@ -541,12 +450,6 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "matchit" version = "0.8.4" @@ -822,19 +725,13 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.10.0", + "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.61.2", ] -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - [[package]] name = "ryu" version = "1.0.20" @@ -847,7 +744,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "axum 0.6.20", + "axum", "envy", "indexmap", "pbjson-types", @@ -954,16 +851,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.1" @@ -985,12 +872,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -1029,7 +910,7 @@ dependencies = [ "libc", "mio", "pin-project-lite", - "socket2 0.6.1", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -1076,24 +957,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" dependencies = [ "async-trait", - "axum 0.8.7", + "axum", "base64", "bytes", "flate2", "h2", - "http 1.4.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.8.1", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", - "socket2 0.6.1", - "sync_wrapper 1.0.2", + "socket2", + "sync_wrapper", "tokio", "tokio-stream", - "tower 0.5.2", + "tower", "tower-layer", "tower-service", "tracing", @@ -1110,22 +991,6 @@ dependencies = [ "tonic", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower" version = "0.5.2" @@ -1137,7 +1002,7 @@ dependencies = [ "indexmap", "pin-project-lite", "slab", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-util", "tower-layer", @@ -1151,10 +1016,10 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.10.0", + "bitflags", "bytes", - "http 1.4.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", "tower-layer", "tower-service", @@ -1283,22 +1148,13 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.5", + "windows-targets", ] [[package]] @@ -1310,22 +1166,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - [[package]] name = "windows-targets" version = "0.53.5" @@ -1333,106 +1173,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - [[package]] name = "windows_aarch64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - [[package]] name = "windows_aarch64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - [[package]] name = "windows_i686_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - [[package]] name = "windows_i686_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - [[package]] name = "windows_i686_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - [[package]] name = "windows_x86_64_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - [[package]] name = "windows_x86_64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - [[package]] name = "windows_x86_64_msvc" version = "0.53.1" diff --git a/server/Cargo.toml b/server/Cargo.toml index d9d1482..468e791 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -axum = "0.6.18" +axum = "0.8.0" async-trait = "0.1.68" pbjson-types = "0.9.0" prost = "0.14.0" diff --git a/server/build.rs b/server/build.rs index d8170e2..efba3f2 100644 --- a/server/build.rs +++ b/server/build.rs @@ -1,24 +1,26 @@ use std::error::Error; -use std::process::{exit, Command, ExitStatus}; +// use std::process::{exit, Command, ExitStatus}; // From // https://github.com/neoeinstein/protoc-gen-prost/blob/fe8e21a9d319c305cda0cfddd146ccddc73d36dd/example/build-with-buf/build.rs -fn process_status(status: ExitStatus) { - if !status.success() { - exit(status.code().unwrap_or(-1)) - } -} +// fn process_status(status: ExitStatus) { +// if !status.success() { +// exit(status.code().unwrap_or(-1)) +// } +// } fn main() -> Result<(), Box> { - process_status( - Command::new("buf") - .arg("generate") - .arg("buf.build/gigantic-minecraft/seichi-game-data") - .current_dir(env!("CARGO_MANIFEST_DIR")) - .status() - .unwrap(), - ); + // Temporarily disabled due to buf.build rate limiting + // The generated files already exist in src/gen/ + // process_status( + // Command::new("buf") + // .arg("generate") + // .arg("buf.build/gigantic-minecraft/seichi-game-data") + // .current_dir(env!("CARGO_MANIFEST_DIR")) + // .status() + // .unwrap(), + // ); Ok(()) } diff --git a/server/src/main.rs b/server/src/main.rs index b31d43f..ef73708 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -134,13 +134,10 @@ mod use_cases { mod infra_axum_handlers { use crate::domain::PlayerDataRepository; use crate::use_cases::GetAllPlayerDataUseCase; - use axum::body; - use axum::body::Body; use axum::extract::State; use axum::http::StatusCode; use axum::response::{IntoResponse, Response}; use axum::routing::{get, MethodRouter}; - use std::convert::Infallible; use std::sync::Arc; #[derive(Clone, Debug)] @@ -194,16 +191,15 @@ mod infra_axum_handlers { } } - fn const_error_response() -> (StatusCode, Response) { + fn const_error_response() -> (StatusCode, String) { ( StatusCode::INTERNAL_SERVER_ERROR, - Response::new( - body::boxed("Encountered internal server error. Please contact the server administrator to resolve the issue.".to_string())), + "Encountered internal server error. Please contact the server administrator to resolve the issue.".to_string(), ) } /// Handler for the `GET /metrics` endpoint. - pub fn handle_get_metrics() -> MethodRouter { + pub fn handle_get_metrics() -> MethodRouter { // we need a separate handler function to create an error tracing span #[tracing::instrument] async fn handle_request(state: &SharedAppState) -> Response { @@ -220,7 +216,7 @@ mod infra_axum_handlers { ) }) { Ok(metrics_presentation) => { - (StatusCode::OK, Response::new(metrics_presentation)).into_response() + (StatusCode::OK, metrics_presentation).into_response() } Err(e) => { tracing::error!("{:?}", e); @@ -435,15 +431,14 @@ mod app { let routes: Router = Router::new() .route("/metrics", infra_axum_handlers::handle_get_metrics()) - .layer(TraceLayer::new_for_http()) - .with_state(shared_state.clone()); + .with_state(shared_state.clone()) + .layer(TraceLayer::new_for_http()); let addr = std::net::SocketAddr::from(([0, 0, 0, 0], 80)); tracing::info!("listening on {}", addr); - Ok(axum::Server::bind(&addr) - .serve(routes.into_make_service()) - .await?) + let listener = tokio::net::TcpListener::bind(addr).await?; + Ok(axum::serve(listener, routes).await?) } } From e9b6e43863386b81f2585b42fd863da322de872b Mon Sep 17 00:00:00 2001 From: Lucky3028 <24449974+Lucky3028@users.noreply.github.com> Date: Sat, 20 Dec 2025 16:33:33 +0900 Subject: [PATCH 3/7] style: run fmt --- server/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index ef73708..5dbe7c4 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -215,9 +215,7 @@ mod infra_axum_handlers { &known_aggregated_player_data, ) }) { - Ok(metrics_presentation) => { - (StatusCode::OK, metrics_presentation).into_response() - } + Ok(metrics_presentation) => (StatusCode::OK, metrics_presentation).into_response(), Err(e) => { tracing::error!("{:?}", e); const_error_response().into_response() From 8fc83e0bdd0e78d56ecd619e36128ad384a7eac9 Mon Sep 17 00:00:00 2001 From: Lucky3028 <24449974+Lucky3028@users.noreply.github.com> Date: Sat, 20 Dec 2025 16:36:49 +0900 Subject: [PATCH 4/7] =?UTF-8?q?revert:=20=E4=B8=80=E6=99=82=E7=9A=84?= =?UTF-8?q?=E3=81=AA=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=A2=E3=82=A6?= =?UTF-8?q?=E3=83=88=E3=82=92=E6=88=BB=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/build.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/server/build.rs b/server/build.rs index efba3f2..25380c8 100644 --- a/server/build.rs +++ b/server/build.rs @@ -1,26 +1,26 @@ use std::error::Error; -// use std::process::{exit, Command, ExitStatus}; +use std::process::{exit, Command, ExitStatus}; // From // https://github.com/neoeinstein/protoc-gen-prost/blob/fe8e21a9d319c305cda0cfddd146ccddc73d36dd/example/build-with-buf/build.rs -// fn process_status(status: ExitStatus) { -// if !status.success() { -// exit(status.code().unwrap_or(-1)) -// } -// } +fn process_status(status: ExitStatus) { + if !status.success() { + exit(status.code().unwrap_or(-1)) + } +} fn main() -> Result<(), Box> { // Temporarily disabled due to buf.build rate limiting // The generated files already exist in src/gen/ - // process_status( - // Command::new("buf") - // .arg("generate") - // .arg("buf.build/gigantic-minecraft/seichi-game-data") - // .current_dir(env!("CARGO_MANIFEST_DIR")) - // .status() - // .unwrap(), - // ); + process_status( + Command::new("buf") + .arg("generate") + .arg("buf.build/gigantic-minecraft/seichi-game-data") + .current_dir(env!("CARGO_MANIFEST_DIR")) + .status() + .unwrap(), + ); Ok(()) } From b03be4d80c94dc1d6761591c92d08b688385279b Mon Sep 17 00:00:00 2001 From: Lucky3028 <24449974+Lucky3028@users.noreply.github.com> Date: Sat, 20 Dec 2025 16:40:26 +0900 Subject: [PATCH 5/7] docs: add comment to update deps together --- server/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/Cargo.toml b/server/Cargo.toml index 468e791..be01212 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -4,6 +4,9 @@ version = "0.1.0" edition = "2021" [dependencies] +# pbjson-types, prost, tonic, tonic-prost は `<= 1.0.0` の範囲でminor versionが上がった場合全て一緒にbumpすること。buf.gen.yamlの +# バージョンをあげることも忘れずに。 + axum = "0.8.0" async-trait = "0.1.68" pbjson-types = "0.9.0" From 7ffbe921708e90d7e326c62aaf1e4071d7a2d8d2 Mon Sep 17 00:00:00 2001 From: Lucky3028 <24449974+Lucky3028@users.noreply.github.com> Date: Sat, 20 Dec 2025 16:48:46 +0900 Subject: [PATCH 6/7] =?UTF-8?q?revert:=20#layer=E3=81=A8#with=5Fstate?= =?UTF-8?q?=E3=82=92=E5=85=A5=E3=82=8C=E6=9B=BF=E3=81=88=E3=82=8B=E6=84=8F?= =?UTF-8?q?=E5=91=B3=E3=81=AF=E3=81=9F=E3=81=B6=E3=82=93=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index 5dbe7c4..057ff95 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -429,8 +429,8 @@ mod app { let routes: Router = Router::new() .route("/metrics", infra_axum_handlers::handle_get_metrics()) - .with_state(shared_state.clone()) - .layer(TraceLayer::new_for_http()); + .layer(TraceLayer::new_for_http()) + .with_state(shared_state.clone()); let addr = std::net::SocketAddr::from(([0, 0, 0, 0], 80)); tracing::info!("listening on {}", addr); From 3379f63e7d79c99517b1db90af286c1c468007c6 Mon Sep 17 00:00:00 2001 From: Lucky <24449974+Lucky3028@users.noreply.github.com> Date: Sat, 20 Dec 2025 16:52:57 +0900 Subject: [PATCH 7/7] docs: remove unnecessary docs --- server/build.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/build.rs b/server/build.rs index 25380c8..d8170e2 100644 --- a/server/build.rs +++ b/server/build.rs @@ -11,8 +11,6 @@ fn process_status(status: ExitStatus) { } fn main() -> Result<(), Box> { - // Temporarily disabled due to buf.build rate limiting - // The generated files already exist in src/gen/ process_status( Command::new("buf") .arg("generate")