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

Patch @cosmjs/math for SES compatibility #9583

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

kriskowal
Copy link
Member

closes: #9408

Description

Pending endojs/endo#2330, we patch @cosmjs/math such that imports from ESM reflect the exported types.

Security Considerations

None.

Scaling Considerations

None.

Documentation Considerations

None.

Testing Considerations

Included test.

Upgrade Considerations

None.

@kriskowal kriskowal requested a review from dckc June 26, 2024 01:09
Copy link

cloudflare-pages bot commented Jun 26, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5852855
Status: ✅  Deploy successful!
Preview URL: https://c5e93326.agoric-sdk.pages.dev
Branch Preview URL: https://kriskowal-cosmjs-math-patch.agoric-sdk.pages.dev

View logs

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

how about putting the test in cosmic-proto?

// A test to verify that importing @cosmsjs/math into an ESM via bundleSource
// can see the exported Decimal constructor, which was at time of writing obscured
// by https://github.com/endojs/endo/pull/2330, temporarily mitigated by a patch.
// Placed here only because Agoric CLI depends on both bundleSource and CosmJS math.
Copy link
Member

Choose a reason for hiding this comment

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

seems like it should go in cosmic-proto.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it was copied rather than moved.

I trust you'll get rid of the copy in agoric-cli before merging.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for spotting. This wasn’t obvious locally.

@kriskowal kriskowal force-pushed the kriskowal-cosmjs-math-patch-9408 branch from d697b4f to e985d4f Compare June 27, 2024 00:00
@kriskowal kriskowal requested a review from dckc June 27, 2024 00:09
@kriskowal kriskowal force-pushed the kriskowal-cosmjs-math-patch-9408 branch from e985d4f to 0fdf898 Compare June 27, 2024 00:34
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

I trust you'll prune the duplicate test before merging

// A test to verify that importing @cosmsjs/math into an ESM via bundleSource
// can see the exported Decimal constructor, which was at time of writing obscured
// by https://github.com/endojs/endo/pull/2330, temporarily mitigated by a patch.
// Placed here only because Agoric CLI depends on both bundleSource and CosmJS math.
Copy link
Member

Choose a reason for hiding this comment

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

Looks like it was copied rather than moved.

I trust you'll get rid of the copy in agoric-cli before merging.

@kriskowal kriskowal force-pushed the kriskowal-cosmjs-math-patch-9408 branch from 0fdf898 to 6acdcef Compare June 28, 2024 21:14
@kriskowal kriskowal force-pushed the kriskowal-cosmjs-math-patch-9408 branch from 6acdcef to 5852855 Compare June 28, 2024 21:16
@kriskowal kriskowal added force:integration Force integration tests to run on PR automerge:rebase Automatically rebase updates, then merge labels Jun 28, 2024
@mergify mergify bot merged commit 4874a7f into master Jun 28, 2024
94 of 96 checks passed
@mergify mergify bot deleted the kriskowal-cosmjs-math-patch-9408 branch June 28, 2024 22:20
@mhofman
Copy link
Member

mhofman commented Jul 1, 2024

How does this address the original issue. A patch in agoric-sdk won't affect dapps if the dapp uses packages installed from NPM

@kriskowal
Copy link
Member Author

How does this address the original issue. A patch in agoric-sdk won't affect dapps if the dapp uses packages installed from NPM

The fix for the underlying issue is endojs/endo#2330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

decode delegation query response fails in Compartment due to undefined Decimal
3 participants