-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Namespace collision between packages' dependencies #20112
Comments
Hi there! This is a problem due to Scallop and Navi exposing two different named addresses with the same name. This should be able to be resolved using the [package]
name = "test"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
[dependencies]
Sui = { override = true, git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" }
ScallopProtocol = { git = "https://github.com/scallop-io/sui-lending-protocol.git", subdir = "contracts/protocol", rev = "mainnet", addr_subst = {"scallop_math" = "math" } }
lending_core = { git = "https://github.com/naviprotocol/protocol-interface.git", subdir = "lending_core", rev = "main", addr_susbst = {"lending_math" = "math" } }
|
Thanks a lot ! It works! |
Hi @tzakian thanks again for the fix ! I added Suilend to the mix, and now it's broken again. I have tried all combinations available, and I can't get it to compile, so I'm calling for your wisdom (again!). Here is the TOML: [package]
name = "my_project"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
# license = "" # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."] # e.g., ["Joe Smith ([email protected])", "John Snow ([email protected])"]
[dependencies]
Sui = { override = true, git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" }
MoveStdlib = { override = true, git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/move-stdlib", rev = "framework/mainnet" }
suilend = { git = "https://github.com/solendprotocol/suilend.git", subdir = "contracts/suilend/", rev = "mainnet" }
ScallopProtocol = { git = "https://github.com/scallop-io/sui-lending-protocol.git", subdir = "contracts/protocol", rev = "mainnet", addr_subst = {"scallop_math" = "math" } }
lending_core = { git = "https://github.com/naviprotocol/protocol-interface.git", subdir = "lending_core", rev = "main", addr_susbst = {"lending_math" = "math"} } Which leads to : Failed to build Move modules: When resolving dependencies for package aftermath_grow, conflicting versions of package Pyth found:
At lending_core -> oracle -> Pyth
Pyth = { git = "https://github.com/naviprotocol/pyth-crosschain.git", rev = "navi-forked", subdir = "target_chains/sui/contracts" }
At suilend -> Pyth
Pyth = { git = "https://github.com/solendprotocol/pyth-crosschain.git", rev = "98e218c64bb75cf1350eb7b021e1ffcc3aedfd62", subdir = "target_chains/sui/contracts" }. Trying to add |
Steps to Reproduce Issue
Consider an empty project with the following
Move.toml
:Expected Result
Everything compiles
Actual Result
Calling
sui move build
will return the following error:Remarks
Note that removing
ScallopProtocol
orlending_core
(Navi Finance) will compile fine.The issue here is likely that both protocols use their own
math
dependency :Given that both libraries are not overlapping, we can't try to override it.
System Information
The text was updated successfully, but these errors were encountered: