Skip to content

style: fix and enforce clippy linting#385

Draft
danieleades wants to merge 3 commits intopop-os:masterfrom
danieleades:clippy
Draft

style: fix and enforce clippy linting#385
danieleades wants to merge 3 commits intopop-os:masterfrom
danieleades:clippy

Conversation

@danieleades
Copy link
Contributor

@danieleades danieleades commented Feb 7, 2026

adds clippy linting.

  • move clippy config to the workspace config
  • address all existing clippy errors
  • add clippy CI job

marked as a draft since this is stacked on #383 and #384 and these should be merged first

Note on Clippy version

this is currently using the pinned toolchain (rust-toolchain.toml) as the clippy version. Pinning clippy to a static version prevents new lints causing breakages in PRs which are unrelated to the changes in those PRs. That's the behaviour we want- but it's not strictly required to pin to this version- it could be a newer version of clippy (since clippy respects the rust-version MSRV).

i've elected not to do that here, because if you pinned clippy to a recent nightly version, you'd need an automated way to regularly bump that pinned version. Renovate can do that- but this project isn't using Renovate.

Something to consider in future.

let _ = crate::release::package_upgrade(|event| {
let _ = dbus_tx.send(SignalEvent::Upgrade(event));
});
}).await;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a bug- without awaiting the future, package_upgrade never ran

}

let _ = child.wait();
let _ = child.wait().await;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another bug- this future never runs in the current implementation

@@ -1,4 +1 @@
fn main() {
pkg_config::Config::new().probe("pop_system_updater_gtk").unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pkg_config::probe("pop_system_updater_gtk") call has been non-functional since the project was renamed from pop-system-updater to pop-upgrade- the .pc file is generated as pop_upgrade_gtk.pc but the probe still referenced the old name. It only appeared to work locally because cargo caches build script output and cargo:rerun-if-changed=build.rs prevented re-execution. In CI (no cache), the probe fails and blocks cargo clippy.

The probe is also unnecessary: it links the gtk rlib against the cdylib that gtk/ffi produces from it, which is circular. Actual system library linking (GTK, glib, dbus) is handled by the Rust -sys crate build scripts. Removing the probe and its pkg-config build-dependency fixes CI and has no effect on the workspace build (verified locally).

@danieleades
Copy link
Contributor Author

@mmstick does it make sense to bundle the formatting changes with this PR?

@mmstick
Copy link
Member

mmstick commented Feb 10, 2026

That is fine as long as it doesn't modify GitHub's workflow mechanism.

@danieleades
Copy link
Contributor Author

... as long as it doesn't modify GitHub's workflow mechanism.

I'm not sure I understand what you mean here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants