Issue with Move CLI and --signers

I’m having issues with the --signers flag in the Move CLI. For example, if I run the first script here:

It fails with the following error:

move run src/scripts/debug_script.move --signers 0xf
Execution failed with unexpected error CONSTRAINT_NOT_SATISFIED

I’m running move 0.1.0.

Thanks for suggestions.

Hi @alftom,
This code works for me when building from the latest diem git hash 039d9d5bd0f5b85d5ce07a2e009374e6dbfd7403. I suspect that you have have built your move binary from an older commit; would you mind re-running cargo install --git move-cli and seeing if this fixes your issue?

1 Like

Just tried (on Mac Big Sur) and it doesn’t fix it. I also did it on a clean install (Mac running High Sierra) after installing Rust and Xcode and got the same result. @sam maybe try a clean install?

Is there something I need to do in terms of disabling private key authentication, or similar?

1 Like

Hi @alftom,
My mistake; when I tried cargo install --git move-cli, I see the same issue asyou. In my previous post, I was using cargo install --path diem/language/tools/move-cli from a checkout of Diem at 039d9d5bd0f5b85d5ce07a2e009374e6dbfd7403. That command worked, and I wrongly assumed that cargo install --git would give me the same result. Could you try cloning the latest Diem repo and installing via cargo install --path diem/language/tools/move-cli instead?


Thanks! That worked. I need to deal with the “copyable” pull request now, but I’ve got my &signer…

1 Like

Well, I should probably wait for more documentation to do any more work on this build given this PR. The Move CLI documentation now fails on resource structs:

Alfreds-MacBook-Pro:real-id-1 alfriko$ move check

┌── src/modules/Test.move:5:5 ───

5 │ resource struct Resource { i: u64 }
│ ^^^^^^^^ Unexpected ‘resource’
5 │ resource struct Resource { i: u64 }
│ -------- Expected ‘fun’

Hey @alftom, this thread may be helpful: Abilities instead of Resources?

Also check move --help to see how to enable old api (or deprecated one). Resources are being deprecated in favor of abilities.

Sorry. Totally missed it. Breaking changes is a different thing.
Another way to work with resources is to rollback to previous version of Diem and compile binary from there. You’d need it right before this PR was merged:

Is it possible for someone to suggest a hash pre-pr hash that is stable? I’ve tried 4 and all had issues.

This one is fine, right before abilities: 1e35dff44f6d3491d480699c5668866f96fefb41
You can checkout to this commit and then build move-cli.

Another option you could try: write a script to replace resource struct S { ... with struct S has key, store { .... I like for AST refactorings like this.

Apologies for the churn, we have just changed the source syntax to support abilities…

That’s doing the trick!