stellar / js-stellar-base

The lowest-level stellar helper library. It consists of classes to read, write, hash, and sign Stellar xdr
https://stellar.github.io/js-stellar-base/
Apache License 2.0
106 stars 138 forks source link

Sharing XDR objects from a dependency #617

Open mootz12 opened 1 year ago

mootz12 commented 1 year ago

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.

silence48 commented 1 year ago

can using yarn resolutions help?

Shaptic commented 11 months ago

@mootz12 is this still true?

mootz12 commented 11 months ago

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