pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
91 stars 46 forks source link

Compilation issue compiling Rust without default features #326

Closed markdingram closed 7 months ago

markdingram commented 9 months ago

Encountering some compile errors down in the Pact crates after running a Cargo update - recreates on master at commit c0201a77296a1664f2294e65f456e8e73fbc5ab6

cargo check --no-default-features
...
error[E0609]: no field `metadata_rules` on type `sync_message_builder::InteractionContents`
   --> pact_consumer/src/builders/sync_message_builder.rs:487:41
    |
487 |       let rules = self.request_contents.metadata_rules.get_or_insert_with(|| MatchingRuleCategory::empty("metadata"));
    |                                         ^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `part_name`, `body`, `rules`, `generators`, `metadata`

error[E0560]: struct `sync_message_builder::InteractionContents` has no field named `metadata_rules`
   --> pact_consumer/src/builders/sync_message_builder.rs:543:7
    |
543 |       metadata_rules: None,
    |       ^^^^^^^^^^^^^^ `sync_message_builder::InteractionContents` does not have this field
....

Perhaps avoid this by adding a no-default-features check to CI?