aptos-core
aptos-core copied to clipboard
[BLK-203] [CLI] --named-addresses CLI flag should take precedence over addresses in move.toml
encountered a potential bug in the CLI:
trying to publish via:
aptos move publish --package-dir ./ --max-gas 10000 --named-addresses hero_demo=default
with this move.toml
name = 'hero_demo'
version = '1.0.0'
upgrade_policy = "compatible"
[dependencies.AptosFramework]
git = '<https://github.com/aptos-labs/aptos-core.git>'
rev = 'main'
subdir = 'aptos-move/framework/aptos-framework'
[addresses]
AptosFramework = '0x1'
hero_demo = "0xCAFE"```
but getting this error:
```aptos move publish --package-dir ./ --max-gas 10000 --named-addresses hero_demo=default
Compiling, may take a little while to download git dependencies...
{
"Error": "Unexpected error: Unable to resolve packages for package 'hero_demo'"
}```
If I replace the `0xCAFE` in the move.toml with my account address it works, but I would expect the CLI override to take precedence?
[Slack Message](https://aptos-org.slack.com/archives/C03N83P7QUC/p1669027677562379?thread_ts=1669027677.562379&cid=C03N83P7QUC)
From SyncLinear.com
This isn't a bug, but intended behavior by the Move packaging system. The original name of the input variable was --additional-named-addresses, but it seemed too long to put and additionally, confusing.
The only thing that could probably be done here is check if the address already exists in the Move.toml, and provide an error message
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.