Skip to content

fix(driver): enable chrono's clock feature - #117

Merged
JP-Ellis merged 1 commit into
mainfrom
fix/driver-chrono-clock
Oct 16, 2026
Merged

JP-Ellis merged 1 commit into
mainfrom
fix/driver-chrono-clock

Conversation

@JP-Ellis

Copy link
Copy Markdown
Member

child_process.rs and repository.rs call Utc::now(), which chrono provides only with its clock feature. The driver declared chrono with serde alone, so it compiled only when another crate in the dependency graph happened to enable clock.

cargo check --no-default-features in drivers/rust/driver failed with "no associated function or constant named now found for struct Utc", and so did pact_matching in pact-reference when built with only its plugins feature. With clock enabled, both build, and Cargo.lock is unchanged.

Found by a cargo hack check --each-feature run in pact-reference.

`child_process.rs` and `repository.rs` call `Utc::now()`, which chrono
only provides with its `clock` feature. The driver declared chrono with
`serde` alone, so it compiled only when another crate in the dependency
graph happened to enable `clock`. `cargo check --no-default-features`
on the driver, or on a dependent such as pact_matching built with only
its `plugins` feature, failed with "no associated function or constant
named `now` found for struct `Utc`".

Assisted-by: Claude Code:claude-opus-5-5
@JP-Ellis
JP-Ellis merged commit 801c143 into main Oct 16, 2026
24 checks passed
@JP-Ellis
JP-Ellis deleted the fix/driver-chrono-clock branch October 16, 2026 05:12
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