Skip to content

fix: build without the webhooks feature; check feature combinations in CI - #24

Merged
CodingAnarchy merged 3 commits into
masterfrom
fix/feature-matrix
Oct 8, 2026
Merged

CodingAnarchy merged 3 commits into
masterfrom
fix/feature-matrix

Conversation

@CodingAnarchy

Copy link
Copy Markdown
Owner

Part of #7 (feature matrix item).

Problem

cargo build -p hammerwork --no-default-features --features postgres (or mysql, or any set without webhooks) failed with unresolved import crate::events. HammerworkConfig embeds events::EventConfig, but pub mod events was gated on webhooks. CI only built with --all-features, so nothing caught it.

Changes

  • events is always compiled, along with its EventManager, JobLifecycleEvent, … re-exports. It depends only on chrono, serde, tokio and uuid; nothing webhook-specific.
  • src/integration_tests.rs (cross-component events + webhooks + streaming tests) is gated on webhooks.
  • HammerworkConfig::production() gets #[allow(clippy::needless_update)] with a comment. Which fields its trailing ..Default::default() fills depends on the enabled features.
  • tests/dequeue_concurrency_tests.rs is gated on a database feature.
  • New CI job feature combinations: cargo clippy -p hammerwork --lib --tests --no-default-features --features <set> -D warnings for "", postgres, mysql, postgres,mysql, postgres,encryption and mysql,tracing.

postgres,streaming is left out for now: building streaming without a concrete backend exposes the placeholder processors, and the Kafka one fakes successful delivery. That's filed as #23, which adds the entry back.

Verification

All six feature sets pass clippy with -D warnings locally. cargo clippy --workspace --all-targets --all-features -D warnings is still clean.

🤖 Generated with Claude Code

CodingAnarchy and others added 2 commits October 8, 2026 04:24
…s in CI

`HammerworkConfig` used `events::EventConfig`, but the `events` module was
gated on `webhooks`, so the crate didn't compile with only a database
feature. The event system has no webhook dependencies, so the module and
its re-exports are now always compiled.

Add a CI job that runs clippy on the library with no features, each
backend alone, both backends, and postgres+encryption / mysql+tracing.
The --all-features jobs couldn't catch this. postgres+streaming is left
out until #23 removes the placeholder processors' simulated delivery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CodingAnarchy
CodingAnarchy merged commit 468e43a into master Oct 8, 2026
12 checks passed
@CodingAnarchy
CodingAnarchy deleted the fix/feature-matrix branch October 8, 2026 08:36
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.

1 participant