pontem-network / dove

🛠️ Diem/Pontem Move package manager
MIT License
35 stars 15 forks source link

Dove "run" doesn't handle multiple script in the same file #98

Closed villesundell closed 3 years ago

villesundell commented 3 years ago

dove run does not handle script files with multiple script{}s correctly.

Example

Consider the following example:

// dummy.move:
script {
    fun main() {
        assert(true, 0);
    }
}

script {
    fun main() {
        assert(true, 0);
    }
}

And try to run it with: dove run --file dummy

Expected result

script{}s should be run one-by-one, in the specified order.

Actual result

thread 'main' panicked at 'removal index (is 0) should be < len (is 0)', library/alloc/src/vec/mod.rs:1355:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
borispovod commented 3 years ago

Thank you for bug report @villesundell, we are working on it.

boozook commented 3 years ago

100 fixes this issue. Thanks!