Drop additional dependencies for unused tracing-level log statements

epel10
Fabio Valentini 6 months ago
parent 3ccf0115b2
commit 92fb446f00
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -1,7 +1,7 @@
From 2c0498c888d111ed23e19673d180ddab448e81b1 Mon Sep 17 00:00:00 2001
From 464572d9eaafc802657529706ebf4872e33e83ad Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 21 May 2024 16:25:06 +0200
Subject: [PATCH] drop deny(warnings) from doctests
Subject: [PATCH 1/2] drop deny(warnings) from doctests
---
src/lib.rs | 2 +-
@ -21,5 +21,5 @@ index 86786e8..51d71ed 100644
#![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")]
--
2.45.1
2.46.0

@ -0,0 +1,92 @@
From 8d9167b880dac3e4cafac486189e8b534f6b10d8 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Wed, 28 Aug 2024 10:18:33 +0200
Subject: [PATCH 2/2] Drop tracing-level log statements that depend on
kv-log-macro
---
src/task/builder.rs | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/task/builder.rs b/src/task/builder.rs
index aba0d61..40c31ab 100644
--- a/src/task/builder.rs
+++ b/src/task/builder.rs
@@ -54,10 +54,10 @@ impl Builder {
{
let wrapped = self.build(future);
- kv_log_macro::trace!("spawn", {
- task_id: wrapped.tag.id().0,
- parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
- });
+ //kv_log_macro::trace!("spawn", {
+ // task_id: wrapped.tag.id().0,
+ // parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
+ //});
let task = wrapped.tag.task().clone();
let handle = async_global_executor::spawn(wrapped);
@@ -74,10 +74,10 @@ impl Builder {
{
let wrapped = self.build(future);
- kv_log_macro::trace!("spawn_local", {
- task_id: wrapped.tag.id().0,
- parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
- });
+ //kv_log_macro::trace!("spawn_local", {
+ // task_id: wrapped.tag.id().0,
+ // parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
+ //});
let task = wrapped.tag.task().clone();
let handle = async_global_executor::spawn_local(wrapped);
@@ -99,10 +99,10 @@ impl Builder {
let res = future.await;
let _ = sender.send(res);
});
- kv_log_macro::trace!("spawn_local", {
- task_id: wrapped.tag.id().0,
- parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
- });
+ //kv_log_macro::trace!("spawn_local", {
+ // task_id: wrapped.tag.id().0,
+ // parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
+ //});
let task = wrapped.tag.task().clone();
wasm_bindgen_futures::spawn_local(wrapped);
@@ -125,10 +125,10 @@ impl Builder {
let _ = sender.send(res);
});
- kv_log_macro::trace!("spawn_local", {
- task_id: wrapped.tag.id().0,
- parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
- });
+ //kv_log_macro::trace!("spawn_local", {
+ // task_id: wrapped.tag.id().0,
+ // parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
+ //});
let task = wrapped.tag.task().clone();
wasm_bindgen_futures::spawn_local(wrapped);
@@ -147,10 +147,10 @@ impl Builder {
let wrapped = self.build(future);
// Log this `block_on` operation.
- kv_log_macro::trace!("block_on", {
- task_id: wrapped.tag.id().0,
- parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
- });
+ //kv_log_macro::trace!("block_on", {
+ // task_id: wrapped.tag.id().0,
+ // parent_task_id: TaskLocalsWrapper::get_current(|t| t.id().0).unwrap_or(0),
+ //});
thread_local! {
/// Tracks the number of nested block_on calls.
--
2.46.0

@ -1,5 +1,5 @@
--- async-std-1.12.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ async-std-1.12.0/Cargo.toml 2024-05-21T14:27:05.181583+00:00
+++ async-std-1.12.0/Cargo.toml 2024-08-28T08:13:20.800376+00:00
@@ -142,7 +142,6 @@
"kv-log-macro",
"log",

@ -1,28 +1,53 @@
--- async-std-1.12.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ async-std-1.12.0/Cargo.toml 2024-05-21T14:27:24.443691+00:00
@@ -46,10 +46,6 @@
[[example]]
+++ async-std-1.12.0/Cargo.toml 2024-08-28T08:15:00.595989+00:00
@@ -47,10 +47,6 @@
name = "tcp-ipv4-and-6-echo"
required-features = ["unstable"]
-
-[[example]]
-name = "surf-web"
-required-features = ["surf"]
-
[[test]]
name = "stream"
@@ -109,10 +105,6 @@
version = "0.4.2"
required-features = ["unstable"]
@@ -80,13 +76,8 @@
version = "0.3.4"
optional = true
-[dependencies.kv-log-macro]
-version = "1.0.6"
-optional = true
-
[dependencies.log]
version = "0.4.8"
-features = ["kv_unstable"]
optional = true
[dependencies.memchr]
@@ -108,13 +99,6 @@
[dependencies.slab]
version = "0.4.2"
optional = true
-
-[dependencies.surf]
-version = "2.0.0"
-optional = true
-
[dev-dependencies.femme]
version = "2.1.1"
-[dev-dependencies.femme]
-version = "2.1.1"
@@ -160,8 +152,6 @@
[dev-dependencies.futures]
version = "0.3.4"
@@ -139,7 +123,6 @@
"async-global-executor",
"async-io",
"futures-lite",
- "kv-log-macro",
"log",
"pin-project-lite",
]
@@ -160,8 +143,6 @@
"async-channel",
"async-lock",
]

@ -16,13 +16,14 @@ Source: %{crates_source}
# Automatically generated patch to strip dependencies and normalize metadata
Patch: async-std-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * drop windows-specific dependencies and features
# * drop WASM-specific dependencies and features
# * drop tokio v0.2 and v0.3 features
# * drop optional surf dependency
# * drop additional dependencies for tracing-level log statements
Patch: async-std-fix-metadata.diff
# * fix building tests with Rust 1.78+
Patch: 0001-drop-deny-warnings-from-doctests.patch
# * drop tracing-level log statements that depend on kv-log-macro
Patch: 0002-Drop-tracing-level-log-statements-that-depend-on-kv-.patch
BuildRequires: cargo-rpm-macros >= 24
@ -216,18 +217,6 @@ use the "futures-lite" feature of the "%{crate}" crate.
%files -n %{name}+futures-lite-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+kv-log-macro-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+kv-log-macro-devel %{_description}
This package contains library source intended for building other packages which
use the "kv-log-macro" feature of the "%{crate}" crate.
%files -n %{name}+kv-log-macro-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+log-devel
Summary: %{summary}
BuildArch: noarch
@ -339,7 +328,9 @@ use the "unstable" feature of the "%{crate}" crate.
%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# remove example that depends on the optional surf dependency
# * remove example that depends on the removed femme dev-dependency
rm examples/logging.rs
# remove example that depends on the removed optional surf dependency
rm examples/surf-web.rs
%generate_buildrequires

@ -1,14 +1,15 @@
[package]
cargo-toml-patch-comments = [
"drop windows-specific dependencies and features",
"drop WASM-specific dependencies and features",
"drop tokio v0.2 and v0.3 features",
"drop optional surf dependency",
"drop additional dependencies for tracing-level log statements",
]
[scripts]
prep.post = [
"# remove example that depends on the optional surf dependency",
"# * remove example that depends on the removed femme dev-dependency",
"rm examples/logging.rs",
"# remove example that depends on the removed optional surf dependency",
"rm examples/surf-web.rs",
]

Loading…
Cancel
Save