rooch
rooch copied to clipboard
[CLI] Cannot compile Move contracts when dependent on the git repository
Configure the dependencies in Move.toml as the git repository, like this:
[package]
name = "RoochDemo"
version = "0.0.1"
[dependencies]
MoveosStdLib = { git = "https://github.com/rooch-network/rooch.git", subdir = "moveos/moveos-stdlib/moveos-stdlib", rev = "main" }
#MoveosStdlib = { local = "../../rooch/moveos/moveos-stdlib/moveos-stdlib" }
[addresses]
rooch_demo = "_"
moveos_std = "0x2"
rooch_framework = "0x3"
Run:
rooch move build --named-addresses rooch_demo={ACCOUNT_ADDR}
UPDATING GIT DEPENDENCY https://github.com/rooch-network/rooch.git
The compilation will error out:
Error: Failed to resolve dependencies for package 'RoochDemo'
If the dependency is changed to local (that is, changed to look like the line that is commented out), it works.
Are there some problems?
Change MoveosStdLib to MoveosStdlib, but the error message is not friendly to devs, needs to be improved.
I think it should raise an error:
Name of dependency declared in package '{}' does not match dependency's package name '{}'
Based on the code
https://github.com/move-language/move/blob/8f5303a365cf9da7554f8f18c393b3d6eb4867f2/language/tools/move-package/src/resolution/dependency_graph.rs#L313-L321
But it does not work as expected. We need to figure it out.