hippospace/move-to-ts

Test generation fails: Cannot output Unit as value for `vector[]`

secretshardul opened this issue · 3 comments

move-to-ts fails to compile the tests for bls12381.move. This file was added recently 8 days ago.

pc@pc:~/Documents/aptos/imperi_core$ move-to-ts -o typescript -n @imperi/imperi-core -t
Working from .
error[E04001]: Not Translatable
    ┌─ /home/pc/.move/https___github_com_aptos-labs_aptos-core_git_e1a9f54/aptos-move/framework/aptos-framework/../aptos-stdlib/sources/cryptography/bls12381.move:408:65
    │
408 │         assert!(option::is_none(&mut aggregate_signatures(vector[])), 1);
    │                                                                 ^^ Cannot output Unit as value

Versions

After trial and error, I found a working combination. A working fix is to downgrade.

  1. Aptos CLI: v0.2.5

  2. Move.toml deps- Hash corresponding to v0.25 374a31df9eb8c9c44f1ce63c0c93e3fcb6e1a336

AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "374a31df9eb8c9c44f1ce63c0c93e3fcb6e1a336" }
AptosStdlib = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "374a31df9eb8c9c44f1ce63c0c93e3fcb6e1a336" }
  1. move-to-ts: 3d6b5d7
cargo install --git https://github.com/hippospace/move-to-ts --rev 3d6b5d7c853fefdaf46b1be5e180aa70b5347abb
  1. NPM package @manahippo/move-to-ts: Downgrade to 0.1.17
npm uninstall @manahippo/move-to-ts && npm i @manahippo/move-to-ts@0.1.17

We should document exact dependencies for future updates.

We are aware of this and should be fixing it in a few days.

fixed in latest!