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

Pact Aeson2 #1242

Merged
merged 178 commits into from
Jul 18, 2023
Merged

Pact Aeson2 #1242

merged 178 commits into from
Jul 18, 2023

Conversation

jmcardon
Copy link
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
.github/workflows/applications.yml Outdated Show resolved Hide resolved
pact.cabal Outdated Show resolved Hide resolved
pact.cabal Outdated Show resolved Hide resolved
@emilypi
Copy link
Member

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
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.

@@ -131,6 +136,10 @@ instance Arbitrary KeySet where
-- | allow `{ "keys": [...], "pred": "..." }`, `{ "keys": [...] }`, and just `[...]`,
-- | the latter cases defaulting to "keys-all"
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
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

pact.cabal Outdated Show resolved Hide resolved
src-ghc/Pact/ApiReq.hs Show resolved Hide resolved
src-ghc/Pact/ApiReq.hs Outdated Show resolved Hide resolved
src-ghc/Pact/ApiReq.hs Outdated Show resolved Hide resolved
src-ghc/Pact/ApiReq.hs Outdated Show resolved Hide resolved
src/Pact/Parse.hs Show resolved Hide resolved
src/Pact/Persist.hs Show resolved Hide resolved
src/Pact/Persist/Pure.hs Show resolved Hide resolved
src/Pact/PersistPactDb.hs Outdated Show resolved Hide resolved
src/Pact/Types/Command.hs Outdated Show resolved Hide resolved
src/Pact/Types/Continuation.hs Outdated Show resolved Hide resolved
src/Pact/Types/Continuation.hs Outdated Show resolved Hide resolved
src/Pact/Types/Continuation.hs Outdated Show resolved Hide resolved
src/Pact/Types/Continuation.hs Outdated Show resolved Hide resolved
src/Pact/Types/Continuation.hs Outdated Show resolved Hide resolved
src/Pact/Types/Term.hs Outdated Show resolved Hide resolved
(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
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.

src/Pact/Types/Type.hs Outdated Show resolved Hide resolved
src/Pact/Types/Util.hs Outdated Show resolved Hide resolved
src/Pact/Types/Util.hs Outdated Show resolved Hide resolved
@jmcardon jmcardon marked this pull request as ready for review July 17, 2023 20:30
Copy link
Member

@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
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
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
5 checks passed
@jmcardon jmcardon deleted the jose-lars/aeson2 branch May 10, 2024 16:24
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.

None yet

6 participants