fix(network): align applet with cosmic-settings 1.3 nmrs backend
Some checks failed
Continuous Integration / formatting (push) Has been cancelled
Continuous Integration / linting (push) Has been cancelled

cosmic-settings 1.3 replaced its custom NetworkManager backend with nmrs
and removed subscriptions/network-manager, which cosmic-applet-network
still referenced by path. That broke manifest resolution for the whole
workspace, so no applet package could be built at all.

Take upstream's post-migration cosmic-applet-network wholesale (upstream
e318f0d4 "migrate NetworkManager flow to nmrs 3.4" plus the nine network
fixes that followed it). None of our local commits touched this crate's
sources, only its manifest, so the only local adjustments to reapply are
the libcosmic -> cosmic workspace alias and the 1.3.0 version.

This also drops the cosmic-dbus-networkmanager dependency, and with it
the last user of the now-dead cosmic-settings-network-manager and
cosmic-settings-sound patch entries, which are removed from the
workspace manifest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lionel DARNIS 2026-07-31 09:47:24 +02:00
parent 5b838a6795
commit fb33b39cec
6 changed files with 923 additions and 926 deletions

465
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -118,13 +118,10 @@ cosmic-settings-a11y-manager-subscription = { path = "/home/lionel/Projets/COSMI
cosmic-settings-accessibility-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/accessibility" }
cosmic-settings-airplane-mode-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/airplane-mode" }
cosmic-settings-daemon-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/settings-daemon" }
cosmic-settings-network-manager-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/network-manager" }
cosmic-settings-sound-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/sound" }
cosmic-settings-upower-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/upower" }
[patch."https://github.com/pop-os/cosmic-settings/"]
cosmic-settings-airplane-mode-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/airplane-mode" }
cosmic-settings-network-manager-subscription = { path = "/home/lionel/Projets/COSMIC/cosmic-settings/subscriptions/network-manager" }
[patch."https://github.com/pop-os/cosmic-text.git"]
cosmic-text = { path = "../cosmic-text" }

View file

@ -5,9 +5,7 @@ edition = "2024"
license = "GPL-3.0-or-later"
[dependencies]
anyhow.workspace = true
async-fn-stream = "0.3"
cosmic-dbus-networkmanager = { path = "../../dbus-settings-bindings/networkmanager" }
futures.workspace = true
futures-util.workspace = true
i18n-embed-fl.workspace = true
@ -25,13 +23,7 @@ tokio.workspace = true
tracing-log.workspace = true
tracing-subscriber.workspace = true
tracing.workspace = true
zbus.workspace = true
indexmap = "2.13.0"
secure-string = "0.3.0"
uuid = { version = "1.21.0", features = ["v4"] }
nmrs = "3.1.3"
[dependencies.cosmic-settings-network-manager-subscription]
path = "../../cosmic-settings/subscriptions/network-manager"
nmrs = "3.4.0"

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,6 @@
mod app;
mod config;
mod localize;
mod utils;
use crate::localize::localize;

View file

@ -1,18 +0,0 @@
use futures_util::future::select;
/// Spawn a background tasks and forward its messages
pub fn forward_event_loop<M: 'static + Send, T: Future<Output = ()> + Send + 'static>(
event_loop: impl FnOnce(async_fn_stream::StreamEmitter<M>) -> T + Send + 'static,
) -> (tokio::sync::oneshot::Sender<()>, cosmic::Task<M>) {
let (cancel_tx, cancel_rx) = tokio::sync::oneshot::channel::<()>();
let task = cosmic::Task::stream(async_fn_stream::fn_stream(|emitter| async move {
select(
std::pin::pin!(cancel_rx),
std::pin::pin!(event_loop(emitter)),
)
.await;
}));
(cancel_tx, task)
}