From 08ab85a9d5cf98b7f5435982aa74ab924b99eb0b Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 7 Dec 2020 13:40:39 +0100 Subject: [PATCH] Remove logging to find bug (yerbamate.ml/LemmyNet/lemmy/pulls/146) --- Cargo.lock | 94 +++++++++++++++------------------- Cargo.toml | 4 +- lemmy_api/Cargo.toml | 4 +- lemmy_apub/Cargo.toml | 4 +- lemmy_apub/src/objects/post.rs | 11 ---- lemmy_db/Cargo.toml | 2 +- lemmy_structs/Cargo.toml | 2 +- lemmy_utils/Cargo.toml | 4 +- lemmy_websocket/Cargo.toml | 4 +- 9 files changed, 54 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8213956d..3e76e5b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ checksum = "5e9fedbe571e267d9b93d071bdc4493f944022c6cce717ebb27d352026fc81c4" dependencies = [ "chrono", "mime", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "thiserror", "url", @@ -21,7 +21,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb8e19a0810cc25df3535061a08b7d8f8a734d309ea4411c57a9767e4a2ffa0e" dependencies = [ "activitystreams", - "serde 1.0.117", + "serde 1.0.118", "serde_json", ] @@ -148,7 +148,7 @@ dependencies = [ "pin-project 1.0.2", "rand", "regex", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "serde_urlencoded", "sha-1 0.9.2", @@ -176,7 +176,7 @@ dependencies = [ "http", "log", "regex", - "serde 1.0.117", + "serde 1.0.118", ] [[package]] @@ -320,7 +320,7 @@ dependencies = [ "pin-project 1.0.2", "regex", "rustls", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "serde_urlencoded", "socket2", @@ -399,9 +399,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7" +checksum = "2c0df63cb2955042487fad3aefd2c6e3ae7389ac5dc1beb28921de0b69f779d4" [[package]] name = "arrayvec" @@ -466,7 +466,7 @@ dependencies = [ "percent-encoding", "rand", "rustls", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "serde_urlencoded", ] @@ -496,7 +496,7 @@ dependencies = [ "log", "num_cpus", "rand", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "thiserror", "tokio 0.2.23", @@ -515,7 +515,7 @@ dependencies = [ "async-trait", "chrono", "log", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "thiserror", "tokio 0.2.23", @@ -745,7 +745,7 @@ dependencies = [ "libc", "num-integer", "num-traits 0.2.14", - "serde 1.0.117", + "serde 1.0.118", "time 0.1.44", "winapi 0.3.9", ] @@ -759,15 +759,6 @@ dependencies = [ "generic-array 0.14.4", ] -[[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -dependencies = [ - "bitflags", -] - [[package]] name = "color_quant" version = "1.1.0" @@ -800,7 +791,7 @@ checksum = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3" dependencies = [ "lazy_static", "nom 5.1.2", - "serde 1.0.117", + "serde 1.0.118", "serde-hjson", ] @@ -1686,7 +1677,7 @@ dependencies = [ "base64 0.12.3", "pem", "ring", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "simple_asn1", ] @@ -1745,7 +1736,7 @@ dependencies = [ "openssl", "rand", "reqwest", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "sha2", "strum", @@ -1789,7 +1780,7 @@ dependencies = [ "percent-encoding", "rand", "reqwest", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "sha2", "strum", @@ -1811,7 +1802,7 @@ dependencies = [ "lemmy_utils", "log", "regex", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "sha2", "strum", @@ -1862,7 +1853,7 @@ dependencies = [ "openssl", "reqwest", "rss", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "sha2", "strum", @@ -1880,7 +1871,7 @@ dependencies = [ "lemmy_db", "lemmy_utils", "log", - "serde 1.0.117", + "serde 1.0.118", "serde_json", ] @@ -1903,7 +1894,7 @@ dependencies = [ "rand", "regex", "reqwest", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "thiserror", "url", @@ -1925,7 +1916,7 @@ dependencies = [ "log", "rand", "reqwest", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "strum", "strum_macros", @@ -1950,7 +1941,7 @@ dependencies = [ "r2d2", "rand", "regex", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "uuid", ] @@ -1970,9 +1961,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.80" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" [[package]] name = "linked-hash-map" @@ -2367,12 +2358,11 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +checksum = "d7c6d9b8427445284a09c55be860a15855ab580a417ccad9da88f5a06787ced0" dependencies = [ - "cfg-if 0.1.10", - "cloudabi", + "cfg-if 1.0.0", "instant", "libc", "redox_syscall", @@ -2723,7 +2713,7 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite 0.2.0", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "serde_urlencoded", "tokio 0.2.23", @@ -2907,9 +2897,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" dependencies = [ "serde_derive", ] @@ -2929,9 +2919,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" dependencies = [ "proc-macro2", "quote", @@ -2947,7 +2937,7 @@ dependencies = [ "indexmap", "itoa", "ryu", - "serde 1.0.117", + "serde 1.0.118", ] [[package]] @@ -2968,7 +2958,7 @@ dependencies = [ "form_urlencoded", "itoa", "ryu", - "serde 1.0.117", + "serde 1.0.118", ] [[package]] @@ -3049,9 +3039,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" +checksum = "ae524f056d7d770e174287294f562e95044c68e88dec909a00d2094805db9d75" [[package]] name = "socket2" @@ -3108,7 +3098,7 @@ checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ "proc-macro2", "quote", - "serde 1.0.117", + "serde 1.0.118", "serde_derive", "syn", ] @@ -3122,7 +3112,7 @@ dependencies = [ "base-x", "proc-macro2", "quote", - "serde 1.0.117", + "serde 1.0.118", "serde_derive", "serde_json", "sha1", @@ -3161,9 +3151,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.53" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8833e20724c24de12bbaba5ad230ea61c3eafb05b881c7c9d3cfe8638b187e68" +checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44" dependencies = [ "proc-macro2", "quote", @@ -3558,7 +3548,7 @@ dependencies = [ "idna", "matches", "percent-encoding", - "serde 1.0.117", + "serde 1.0.118", ] [[package]] @@ -3568,7 +3558,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" dependencies = [ "rand", - "serde 1.0.117", + "serde 1.0.118", ] [[package]] @@ -3650,7 +3640,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" dependencies = [ "cfg-if 1.0.0", - "serde 1.0.117", + "serde 1.0.118", "serde_json", "wasm-bindgen-macro", ] diff --git a/Cargo.toml b/Cargo.toml index 42378726..019d0db3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ lemmy_websocket = { path = "./lemmy_websocket" } diesel = "1.4.5" diesel_migrations = "1.4.0" chrono = { version = "0.4.19", features = ["serde"] } -serde = { version = "1.0.117", features = ["derive"] } +serde = { version = "1.0.118", features = ["derive"] } actix = "0.10.0" actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] } actix-files = { version = "0.4.1", default-features = false } @@ -44,7 +44,7 @@ openssl = "0.10.30" http-signature-normalization-actix = { version = "0.4.1", default-features = false, features = ["sha-2"] } tokio = "0.3.5" sha2 = "0.9.2" -anyhow = "1.0.34" +anyhow = "1.0.35" reqwest = { version = "0.10.9", features = ["json"] } activitystreams = "0.7.0-alpha.8" actix-rt = { version = "1.1.1", default-features = false } diff --git a/lemmy_api/Cargo.toml b/lemmy_api/Cargo.toml index 1a39df41..4d32db2f 100644 --- a/lemmy_api/Cargo.toml +++ b/lemmy_api/Cargo.toml @@ -19,7 +19,7 @@ diesel = "1.4.5" bcrypt = "0.9.0" chrono = { version = "0.4.19", features = ["serde"] } serde_json = { version = "1.0.60", features = ["preserve_order"] } -serde = { version = "1.0.117", features = ["derive"] } +serde = { version = "1.0.118", features = ["derive"] } actix = "0.10.0" actix-web = { version = "3.3.2", default-features = false } actix-rt = { version = "1.1.1", default-features = false } @@ -42,7 +42,7 @@ uuid = { version = "0.8.1", features = ["serde", "v4"] } sha2 = "0.9.2" async-trait = "0.1.42" captcha = "0.0.8" -anyhow = "1.0.34" +anyhow = "1.0.35" thiserror = "1.0.22" background-jobs = "0.8.0" reqwest = { version = "0.10.9", features = ["json"] } diff --git a/lemmy_apub/Cargo.toml b/lemmy_apub/Cargo.toml index 8b78c77c..fd4395c4 100644 --- a/lemmy_apub/Cargo.toml +++ b/lemmy_apub/Cargo.toml @@ -19,7 +19,7 @@ activitystreams-ext = "0.1.0-alpha.2" bcrypt = "0.9.0" chrono = { version = "0.4.19", features = ["serde"] } serde_json = { version = "1.0.60", features = ["preserve_order"] } -serde = { version = "1.0.117", features = ["derive"] } +serde = { version = "1.0.118", features = ["derive"] } actix = "0.10.0" actix-web = { version = "3.3.2", default-features = false } actix-rt = { version = "1.1.1", default-features = false } @@ -42,7 +42,7 @@ itertools = "0.9.0" uuid = { version = "0.8.1", features = ["serde", "v4"] } sha2 = "0.9.2" async-trait = "0.1.42" -anyhow = "1.0.34" +anyhow = "1.0.35" thiserror = "1.0.22" background-jobs = "0.8.0" reqwest = { version = "0.10.9", features = ["json"] } diff --git a/lemmy_apub/src/objects/post.rs b/lemmy_apub/src/objects/post.rs index d34098c5..39b74997 100644 --- a/lemmy_apub/src/objects/post.rs +++ b/lemmy_apub/src/objects/post.rs @@ -20,7 +20,6 @@ use activitystreams::{ }; use activitystreams_ext::Ext1; use anyhow::Context; -use backtrace::Backtrace; use lemmy_db::{ community::Community, post::{Post, PostForm}, @@ -36,7 +35,6 @@ use lemmy_utils::{ LemmyError, }; use lemmy_websocket::LemmyContext; -use log::error; use url::Url; #[async_trait::async_trait(?Send)] @@ -148,15 +146,6 @@ impl FromApubToForm for PostForm { let community = get_or_fetch_and_upsert_community(community_actor_id, context, request_counter).await?; - if community.local && creator.local { - let page_id = page.id_unchecked().context(location_info!())?; - let bt = Backtrace::new(); - error!( - "Lemmy is parsing a local post as remote, page id: {}, stack trace: {:?}", - page_id, bt - ); - } - let thumbnail_url = match &page.inner.image() { Some(any_image) => Image::from_any_base( any_image diff --git a/lemmy_db/Cargo.toml b/lemmy_db/Cargo.toml index 1d13a88b..11b27fcd 100644 --- a/lemmy_db/Cargo.toml +++ b/lemmy_db/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" lemmy_utils = { path = "../lemmy_utils" } diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","64-column-tables","serde_json"] } chrono = { version = "0.4.19", features = ["serde"] } -serde = { version = "1.0.117", features = ["derive"] } +serde = { version = "1.0.118", features = ["derive"] } serde_json = { version = "1.0.60", features = ["preserve_order"] } strum = "0.20.0" strum_macros = "0.20.1" diff --git a/lemmy_structs/Cargo.toml b/lemmy_structs/Cargo.toml index d11f4a68..e1462306 100644 --- a/lemmy_structs/Cargo.toml +++ b/lemmy_structs/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" [dependencies] lemmy_db = { path = "../lemmy_db" } lemmy_utils = { path = "../lemmy_utils" } -serde = { version = "1.0.117", features = ["derive"] } +serde = { version = "1.0.118", features = ["derive"] } log = "0.4.11" diesel = "1.4.5" actix-web = "3.3.2" diff --git a/lemmy_utils/Cargo.toml b/lemmy_utils/Cargo.toml index 2a102110..ae3d246b 100644 --- a/lemmy_utils/Cargo.toml +++ b/lemmy_utils/Cargo.toml @@ -16,7 +16,7 @@ log = "0.4.11" itertools = "0.9.0" rand = "0.7.3" percent-encoding = "2.1.0" -serde = { version = "1.0.117", features = ["derive"] } +serde = { version = "1.0.118", features = ["derive"] } serde_json = { version = "1.0.60", features = ["preserve_order"] } thiserror = "1.0.22" comrak = { version = "0.9.0", default-features = false } @@ -25,5 +25,5 @@ openssl = "0.10.30" url = { version = "2.2.0", features = ["serde"] } actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] } actix-rt = { version = "1.1.1", default-features = false } -anyhow = "1.0.34" +anyhow = "1.0.35" reqwest = { version = "0.10.9", features = ["json"] } diff --git a/lemmy_websocket/Cargo.toml b/lemmy_websocket/Cargo.toml index 46a67129..a7b710bc 100644 --- a/lemmy_websocket/Cargo.toml +++ b/lemmy_websocket/Cargo.toml @@ -16,10 +16,10 @@ lemmy_rate_limit = { path = "../lemmy_rate_limit" } reqwest = { version = "0.10.9", features = ["json"] } log = "0.4.11" rand = "0.7.3" -serde = { version = "1.0.117", features = ["derive"] } +serde = { version = "1.0.118", features = ["derive"] } serde_json = { version = "1.0.60", features = ["preserve_order"] } actix = "0.10.0" -anyhow = "1.0.34" +anyhow = "1.0.35" diesel = "1.4.5" background-jobs = "0.8.0" tokio = "0.3.5" -- 2.44.1