Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail fast when uponReceiving is not set #1340

Open
sku0x20 opened this issue Jan 13, 2025 · 1 comment
Open

fail fast when uponReceiving is not set #1340

sku0x20 opened this issue Jan 13, 2025 · 1 comment
Labels
enhancement Indicates new feature requests triage This issue is yet to be triaged by a maintainer

Comments

@sku0x20
Copy link

sku0x20 commented Jan 13, 2025

Checklist

Before making a feature request, I have:

Feature description

when adding interactions in PactV4, fail fast if uponReceiving is not set.
from what i found its a required parameter.
if it can't be done; pls add it in the docs.

Use case

save debug time by failing fast if uponReceiving is not set.

Issue

my pact file was always having the last interaction no matter how i run the tests.
i wasted 2 days of debugging, thinking it was different pact instances causing the issue, trying to have global setup, finding PactfileWriteMode can help but not there in v4, removed cause rust core does merging by default, looking at debug traces, which says merging, yet it's not happening. after all this finding uponReceiving by chance.
very frustrated rn. :(

imho, instead of uponReceiving just putting description in builder would have helped too.

anyways, as a stupid person i would really appreciate some basic stupidity checks. :(

@sku0x20 sku0x20 added enhancement Indicates new feature requests triage This issue is yet to be triaged by a maintainer labels Jan 13, 2025
@mefellows
Copy link
Member

Yep, that's fair. The types (that generaly try to enforce this) can't be changed now as that would be a breaking change, but we can check inside the function calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests triage This issue is yet to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants