From 8b166b232760ed4cae4f2009a6f96d79858db9c3 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Sun, 22 Mar 2026 17:59:20 +0100 Subject: [PATCH] fetch: Log on old sigrefs In hopes of nudging users to upgrade, print a warning if older feature levels are encountered. However, only do this for delegates, as these are more critical for the repository, to not log too many warnings. --- crates/radicle-fetch/src/state.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/radicle-fetch/src/state.rs b/crates/radicle-fetch/src/state.rs index 209de59b..c7f378fd 100644 --- a/crates/radicle-fetch/src/state.rs +++ b/crates/radicle-fetch/src/state.rs @@ -8,7 +8,7 @@ use radicle::identity::{Did, Doc, DocError}; use radicle::storage; use radicle::storage::git::Repository; -use radicle::storage::refs::RefsAt; +use radicle::storage::refs::{FeatureLevel, RefsAt}; use radicle::storage::{ git::Validation, Remote, RemoteId, RemoteRepository, Remotes, ValidateRepository, Validations, }; @@ -548,6 +548,7 @@ impl FetchState { } } + let level = refs.feature_level(); let cache = self.as_cached(handle); let mut fails = sigrefs::validate(&cache, refs)?.unwrap_or(Validations::default()); @@ -561,6 +562,10 @@ impl FetchState { valid_delegates.insert(remote); remotes.insert(remote); } + + if level < FeatureLevel::LATEST { + log::warn!("Delegate {remote} is on feature level '{level}' which is lower than '{}', they should consider upgrading Radicle.", FeatureLevel::LATEST) + } } } }