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

Replace Data.BigInt with JS.BigInt #1551

Merged
merged 7 commits into from
Nov 9, 2023
Merged

Conversation

kozross
Copy link
Collaborator

@kozross kozross commented Oct 11, 2023

Closes #1472. Due to us needing Aeson instances, I had to create a newtype wrapper: I've tried to keep its API as similar to the Data.BigInt one as possible, so that switching is painless.

For some reason, I get CI failures due to Nix not installing the necessary library: locally I have no problems.

Pre-review checklist

  • All code has been formatted using our config (make format)
  • Any new API features or modification of existing behavior is covered as defined in our test plan
  • The changelog has been updated under the ## Unreleased header, using the appropriate sub-headings (### Added, ### Removed, ### Fixed), and the links to the appropriate issues/PRs have been included

@kozross kozross requested a review from klntsky October 11, 2023 20:25
@kozross kozross changed the title Koz/1472 Replace Data.BigInt with JS.BigInt Oct 11, 2023
src/Internal/Types/BigInt.purs Outdated Show resolved Hide resolved
@klntsky
Copy link
Member

klntsky commented Oct 12, 2023

For some reason, I get CI failures due to Nix not installing the necessary library: locally I have no problems.

You probably forgot to run spago2nix, read doc/development.md

src/Contract/Numeric/BigInt.purs Outdated Show resolved Hide resolved
packages.dhall Outdated Show resolved Hide resolved
@bladyjoker
Copy link
Collaborator

@klntsky @kozross I fixed the CI error as I would like to upgrade LB to this whole new shiny thing asap

@bladyjoker
Copy link
Collaborator

@klntsky @kozross I fixed the CI error as I would like to upgrade LB to this whole new shiny thing asap

  ✗ AdditionalUtxos example:
  Error: Couldn't get tx output for (TransactionInput { index: 1u, transactionId: (TransactionHash (hexToByteArrayUnsafe "a95adbfc463c87aca6eeab66174bf803752d0b861643dcd26e2bbd6c451f43ac")) })
    at Module.error (file:///build/output/Effect.Exception/foreign.js:6:10)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:79:7)
    at go (file:///build/output/Data.Traversable/foreign.js:36:42)
    at file:///build/output/Data.Traversable/foreign.js:46:20
    at <anonymous> (/build/.spago/foldable-traversable/v6.0.0/src/Data/Traversable.purs:207:20)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:118:59)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:78:44)
    ```

@klntsky klntsky assigned klntsky and unassigned kozross Nov 9, 2023
@bladyjoker
Copy link
Collaborator

@klntsky @kozross I fixed the CI error as I would like to upgrade LB to this whole new shiny thing asap

  ✗ AdditionalUtxos example:
  Error: Couldn't get tx output for (TransactionInput { index: 1u, transactionId: (TransactionHash (hexToByteArrayUnsafe "a95adbfc463c87aca6eeab66174bf803752d0b861643dcd26e2bbd6c451f43ac")) })
    at Module.error (file:///build/output/Effect.Exception/foreign.js:6:10)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:79:7)
    at go (file:///build/output/Data.Traversable/foreign.js:36:42)
    at file:///build/output/Data.Traversable/foreign.js:46:20
    at <anonymous> (/build/.spago/foldable-traversable/v6.0.0/src/Data/Traversable.purs:207:20)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:118:59)
    at <anonymous> (/nix/store/yh2q4qc6dvfm6vxjf90gk4i7jv4vxm82-cardano-transaction-lib-src/src/Internal/Contract/MinFee.purs:78:44)
    ```

Dammit this passes locally! Oh God of Reproducibility, where is you universal determinism now? Why does Plutip have free will while the rest of us are wallowing in our destinies?

@bladyjoker
Copy link
Collaborator

Woohoo! @klntsky this is green!

@klntsky klntsky merged commit 6b76ffe into dshuiski/purs-0.15-migration Nov 9, 2023
3 checks passed
@klntsky klntsky deleted the koz/1472 branch November 9, 2023 17: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.

3 participants