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

Support Pact Events #819

Merged
merged 11 commits into from
Oct 3, 2020
Merged

Support Pact Events #819

merged 11 commits into from
Oct 3, 2020

Conversation

sirlensalot
Copy link
Contributor

@sirlensalot sirlensalot commented Oct 1, 2020

Resolves #818

-- otherwise push, test, pop and install onto head
evalComposed = checkManaged i af cap cdef >>= \r -> case r of
Nothing -> push >> test >> popCapStack installComposed
Just composed -> installComposed (CapSlot scope cap composed)
Just composed -> emitCap >> installComposed (CapSlot scope cap composed)
Copy link
Member

Choose a reason for hiding this comment

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

Nice - we only emit on successful install, and install is a pure function.

data PactSuccess = PactSuccess
{ _successValue :: PactValue
, _successEvents :: [PactEvent]
} deriving (Eq, Show, Generic)
Copy link
Member

Choose a reason for hiding this comment

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

We should strictify this data.

{ _eventName :: QualifiedName
, _eventParams :: [PactValue]
, _eventModuleHash :: ModuleHash
} deriving (Eq, Show, Generic)
Copy link
Member

Choose a reason for hiding this comment

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

Strictify?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and I also broke into Text + ModuleName, mainly because of the Info in qualified name messing up the JSON, but also allows for indexing on name/topic alone (ie all TRANSFERs, not just coin.TRANSFER etc)

Copy link
Contributor

@LindaOrtega LindaOrtega left a comment

Choose a reason for hiding this comment

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

Docs looks good, but I added some formatting suggestions.

docs/en/pact-reference.md Outdated Show resolved Hide resolved
docs/en/pact-reference.md Outdated Show resolved Hide resolved
docs/en/pact-reference.md Outdated Show resolved Hide resolved
docs/en/pact-reference.md Outdated Show resolved Hide resolved
docs/en/pact-reference.md Show resolved Hide resolved
docs/en/pact-reference.md Outdated Show resolved Hide resolved
docs/en/pact-reference.md Show resolved Hide resolved
docs/en/pact-reference.md Show resolved Hide resolved
docs/en/pact-reference.md Show resolved Hide resolved
docs/en/pact-reference.md Show resolved Hide resolved
Stuart Popejoy and others added 3 commits October 2, 2020 19:48
Co-authored-by: Linda Ortega <LindaOrtega@users.noreply.github.com>
Co-authored-by: Linda Ortega <LindaOrtega@users.noreply.github.com>
@sirlensalot sirlensalot dismissed LindaOrtega’s stale review October 3, 2020 00:07

Auto-implemented suggestions

@sirlensalot sirlensalot merged commit 5ec7c90 into master Oct 3, 2020
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.

Pact Events
4 participants