Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Named addresses not working with Dove run 1.6.0-86817ac #180

Open
villesundell opened this issue Dec 20, 2021 · 2 comments
Open

Named addresses not working with Dove run 1.6.0-86817ac #180

villesundell opened this issue Dec 20, 2021 · 2 comments

Comments

@villesundell
Copy link
Contributor

Hello!
Using TaoHe, consider the following file, and place it to scripts/:

script {
    use TaoHe::Errors;

    fun dummy_1() {
        assert(true, Errors::ownable_not_owned());
    }
}

It results the following error message while running dove run -v "dummy_1()":

error[E03002]: unbound module
   ┌─ /home/ville/projects/taohe/scripts/dummy.move:17:9
   │
17 │     use TaoHe::Errors;
   │         ^^^^^^^^^^^^^ Invalid 'use'. Unbound module: 'TaoHe::Errors'

error[E03002]: unbound module
   ┌─ /home/ville/projects/taohe/scripts/dummy.move:20:22
   │
20 │         assert(true, Errors::ownable_not_owned());
   │                      ^^^^^^ Unbound module alias 'Errors'

...while this works fine (also you can use the upstream dummy() to verify this):

script {
    fun dummy_2() {
        assert(true, 123);
    }
}

TaoHe namespace (and even TaoHe::Errors) is used multiple times in sources/, and is compiling fine. This problem (or some variation of it) seems to occur with dove test too.

@villesundell
Copy link
Contributor Author

This is still happening with 1.5.4, however, one should use the following file to replicate the error:

script {
    use TaoHe::Errors;

    fun dummy_1() {
        assert!(false, Errors::ownable_not_owned());
    }
}

The error message is also different now:

Execution failed due to unresolved type argument(s) (i.e., `--type-args 0x1::M:T` when there is no module named M at 0x1 or no type named T in module 0x1::M)

(Also, maybe dove prove is also experiencing the same problem?)

@villesundell villesundell changed the title Named addresses not working with Dove run/test 1.5.1 Named addresses not working with Dove run 1.5.5 Jan 25, 2022
@villesundell villesundell changed the title Named addresses not working with Dove run 1.5.5 Named addresses not working with Dove run 1.6.0-86817ac Feb 9, 2022
@villesundell
Copy link
Contributor Author

This problem is still present in 1.6.0, and now the test problem fixed in 1.5.6 resurrected in 1.6.0.

The test problem being:

┌── test_wrap ──────
│ ITE: An unknown error was reported. Location: 
│ VMError (if there is one): VMError {
│     major_status: UNEXPECTED_VERIFIER_ERROR,
│     sub_status: None,
│     message: Some(
│         "Unexpected verifier/deserialization error! This likely means there is code stored on chain that is unverifiable!\nError: VMError { major_status: MISSING_DEPENDENCY, sub_status: None, message: None, location: Module(ModuleId { address: 0000000000000000000000000000000000000000000000000000000000000001, name: Identifier(\"DiemAccount\") }), indices: [(FunctionHandle, 0)], offsets: [] }",
│     ),
│     location: Module(
│         ModuleId {
│             address: 0000000000000000000000000000000000000000000000000000000000000001,
│             name: Identifier(
│                 "DiemAccount",
│             ),
│         },
│     ),
│     indices: [
│         (
│             FunctionHandle,
│             0,
│         ),
│     ],
│     offsets: [],
│ }
└──────────────────

Might open a new issue for this for clarity 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant