js-stellar-base icon indicating copy to clipboard operation
js-stellar-base copied to clipboard

Sharing XDR objects from a dependency

Open mootz12 opened this issue 2 years ago • 3 comments

Describe the bug When attempting to create a package that manages building the complicated XDR objects required for Soroban, I am unable to use separate but identical versions of stellar-base to handle these XDR objects. The use case is the consumer (a dApp or node script, for example) likely already relies on soroban-client and/or stellar-sdk.

For more context see the discussion in discord here: https://discord.com/channels/897514728459468821/1113560546705428600

What version are you on?

"stellar-base": "9.0.0-soroban.3"

To Reproduce Steps to reproduce the behavior:

  1. Go the MVE Repository and follow the reproduction steps https://github.com/mootz12/mve-xdr-dependency

Expected behavior The XDR object created by the dependency is valid

Additional context The current workarounds are to re-export xdr that the dependency uses, or to have the package return the xdr objects as strings and expect the consumer to build them from the string.

mootz12 avatar Jun 01 '23 13:06 mootz12

can using yarn resolutions help?

silence48 avatar Jun 27 '23 05:06 silence48

@mootz12 is this still true?

Shaptic avatar Oct 09 '23 22:10 Shaptic

Yeah, I updated the stellar-base dependency to 10.0.0-beta.3 on the MVE repo above and was still observing the issue.

mootz12 avatar Oct 10 '23 12:10 mootz12