aptos-labs / aptos-core

Aptos is a layer 1 blockchain built to support the widespread use of blockchain through better technology and user experience.
https://aptosfoundation.org
Other
6.18k stars 3.65k forks source link

[Feature Request] Show more details when getting error EPACKAGE_DEP_MISSING #15043

Open 0xbe1 opened 2 weeks ago

0xbe1 commented 2 weeks ago

🚀 Feature Request

When publishing a new contract, oftentimes I run into

Do you want to publish this package under the resource account's address 0xca...? [yes/no] >
yes
package size 17138 bytes
{
  "Error": "Simulation failed with status: Move abort in 0x1::code: EPACKAGE_DEP_MISSING(0x60005): Dependency could not be resolved to any published package."
}

It takes quite some effort in order to figure out which exact dependency is not missing. Would be great if we can get something like below to improve DevX

Do you want to publish this package under the resource account's address 0xca...? [yes/no] >
yes
package size 17138 bytes
{
  "Error": "Simulation failed with status: Move abort in 0x1::code: EPACKAGE_DEP_MISSING(0x60005): Dependency could not be resolved to any published package."
}
Dependency FixedPoint64 cannot be found at address 0xabc

Motivation

Is your feature request related to a problem? Please describe.

Pitch

Describe the solution you'd like

Describe alternatives you've considered

Are you willing to open a pull request? (See CONTRIBUTING)

Additional context

gregnazario commented 2 weeks ago

As discussed, possibly something could be added in the VM to provide more information on local simulation, that would allow users to debug.