Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Pact Aeson2#1242

Merged
jmcardon merged 178 commits intomasterfrom
jose-lars/aeson2
Jul 18, 2023
Merged

Pact Aeson2#1242
jmcardon merged 178 commits intomasterfrom
jose-lars/aeson2

Conversation

@jmcardon
Copy link
Copy Markdown
Member

PR checklist:

  • Test coverage for the proposed changes
  • PR description contains example output from repl interaction or a snippet from unit test output
  • Documentation has been updated if new natives or FV properties have been added. To generate new documentation, issue cabal run tests. If they pass locally, docs are generated.
  • Any changes that could be relevant to users have been recorded in the changelog
  • In case of changes to the Pact trace output (pact -t), make sure pact-lsp is in sync.

Additionally, please justify why you should or should not do the following:

  • Confirm replay/back compat
  • Benchmark regressions
  • (For Kadena engineers) Run integration-tests against a Chainweb built with this version of Pact

@jmcardon jmcardon marked this pull request as draft June 19, 2023 01:05
@emilypi
Copy link
Copy Markdown
Contributor

emilypi commented Jul 11, 2023

Resolved my comments cuz we got crypton merged.

-- on chain 0 at block height 1720161 (txid 2475483). So, we would have
-- to do this in a fork.
denom :: UTCTime -> Integer
denom = denominator . (% 1000) . fromIntegral . toPosixTimestampMicros
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note: still needs fixing.

instance FromJSON KeySet where

-- Aeson failures:
-- aeson-1: "read-keyset: parse failed: parsing [] failed, expected Array, but encountered Object: {\"pred\": \"\" ,\"keys\":\n[\"48acfef8d60e90a7c3675cbe7cb4162c15b80d196a5586962cb8a789f1c79fe2\"]}"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Need to follow up on this as well

(TNative n _fn tys _exs d tl i) -> J.object
[ prop TermNatFunTypes J..= J.Array tys
, prop TermName J..= n
, prop TermFun J..= J.null {- TODO fn -}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not Todo, this is just unlawful and doesn't serialize.

@jmcardon jmcardon marked this pull request as ready for review July 17, 2023 20:30
Copy link
Copy Markdown
Contributor

@emilypi emilypi left a comment

Choose a reason for hiding this comment

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

Approved. Incredible effort @jmcardon and @larskuhtz

instance ToJSON FullyQualifiedName where
toJSON (FullyQualifiedName n (ModuleName m ns) hsh) =
toJSON $ maybe "" ((<> ".") . _namespaceName) ns <> m <> "." <> n <> ".{" <> hashToText hsh <> "}"
fqdnJsonText :: FullyQualifiedName -> T.Text
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor nit, not sure why this is toplevel, only used once

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will fix in followup PR

@jmcardon jmcardon merged commit 7e08878 into master Jul 18, 2023
@jmcardon jmcardon deleted the jose-lars/aeson2 branch May 10, 2024 16:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants