Coder Social home page Coder Social logo

dove's People

Contributors

boozook avatar borispovod avatar cab404 avatar krishnacore avatar mkurnikov avatar olegvg avatar rig410 avatar villesundell avatar vitvakatu avatar vladimirovmm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dove's Issues

"dove prove" does not accept z3 (nor cvc4) executable path correctly anymore

Hello again!
While dove prove works fine with 1.3.0-44c7e88, the --z3-exe switch seems broken in 1.3.0-9283954.

One used to be able to run dove prove --boogie-exe ~/.dotnet/tools/boogie --z3-exe ~/bin/z3 successfully, but with the current version, the output is as follows:

โžœ  taohe git:(master) โœ— dove prove --boogie-exe ~/.dotnet/tools/boogie --z3-exe ~/bin/z3

ERROR: z3 executable not found in PATH. Please install it from https://github.com/Z3Prover/z3

The only way I got this to work was setting up PATH correctly, and running dove prove without arguments. (With the arguments above, I would still get errors: cvc4 cannot be found, and --cvc4-exe does not seem to fix the problem.)

Dove: Looping in dependencies

When creating a project with a recursive dependency, an error occurs:

Download:[https://github.com/vladimirovmm/for_test_dove_repositories]

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

Example of a recursive dependency:
https://github.com/vladimirovmm/for_test_dove_repositories/tree/cyclic_dependency

Or in dove.toml:

dependencies = [
    { git = "https://github.com/pontem-network/move-stdlib", tag = "v0.1.2" },
    { git = "https://github.com/vladimirovmm/for_test_dove_repositories", branch = "cyclic_dependency" },
]

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

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

Decompiler doesn't work on *.mvt files

The decompiler doesn't work on *.mvt files.
How to reproduce: Just generate any *.mvt file and try to decompile it, you will get error:

status BAD_MAGIC of type Deserialization

Dove test broken on 1.6 when Diem specific code is referenced

Hello, fellow Move soldiers!
We continue marching on, despite the negative news lately.
Glad to see 1.6 being released nevertheless ๐ŸŽ‰

The previous issue with dove test that was fixed in 1.5.6 (#180) reincarnated in 1.6.0-86817ac.

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: [],
โ”‚ }
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

[Question] Plans to support Dove after move-build lands?

Hello!
Do you plan to develop and support Dove (with Diem) after move-build lands (diem/diem#8775)?

It would be great to have only one build system for all the MoveVM platforms, so as a developer I would hope that either:

  • Pontem would switch to move-build, or
  • Pontem would continue supporting Diem ๐Ÿ™‚

Move 1.4 support

Hello everyone!
When Move 1.4 (https://github.com/diem/diem/releases/tag/diem-core-v1.4.1) would be supported?
I would need phantom support ๐Ÿ˜† (Specifically, I would need support for different abilities for phantom types than the struct itself. In my understanding this is not supported in "vanilla" Move, although older Move conceptually supports phantom types.)

Move 1.4 changelog is a bit misleading, since phantom is not listed in changes/ on that tag, but is still implemented, as can be seen here.

Change the format of the test description.

Now we use the documentation comments to describe the skate tests. Which is not valid from the point of view of the compiler. Now we ignore this problem.
And we are also tied to the standard library.
To fix this, we are adding a DSL to initialize the state of the test story.

Samples:

It is executed before the test is executed and allows you to configure the state.

#[before(
    use 0x1::Block;
    Block::set_block(1000);
    let coin = {value : 42};
    move_to(0x1, 0x1::Account::Balance<0x1::Coins::BTC> { coin: coin })
)]

A flag indicating that changes made during the script execution will be ignored by the following scripts.
#[dry_run]

Expectations that the test will fail with an abortion error.
#[failure=1]

CODE_DESERIALIZATION_ERROR while running "dove run"

While trying to run "dove run" with Dove 1.3.0, I get:

โžœ  taohe git:(master) โœ— dove run --file immutable                                                                  
Execution failed with unexpected error CODE_DESERIALIZATION_ERROR

This used to work with 1.2.8.

You can use https://github.com/taoheorg/taohe for testing (master supports Dove 1.3.0).

EDIT: If you are using TaoHe for testing, it's probably noteworthy that dove run --file dummy does not produce any output, but instead terminates silently.

"cargo install --path dove" broke recently

Hello!
Until recently, I was able to install Dove by running: cargo install --path dove. However, it does not work anymore, resulting:

โžœ  move-tools git:(9283954) โœ— cargo install --path dove
  Installing dove v1.3.0 (/home/ville/projects/move-tools/dove)
    Updating crates.io index
    Updating git repository `https://github.com/pontem-network/diem.git`
    Updating git repository `https://github.com/scs/substrate-api-client.git`
error: failed to compile `dove v1.3.0 (/home/ville/projects/move-tools/dove)`, intermediate artifacts can be found at `/home/ville/projects/move-tools/target`

Caused by:
  failed to select a version for the requirement `crypto-mac = "^0.7"`
  candidate versions found which didn't match: 0.11.1, 0.11.0, 0.10.1, ...
  location searched: crates.io index
  required by package `hmac v0.7.0`
      ... which is depended on by `hmac-drbg v0.2.0`
      ... which is depended on by `libsecp256k1 v0.3.4`
      ... which is depended on by `sp-io v2.0.0`
      ... which is depended on by `substrate-api-client v0.4.9-sub2.0.0 (https://github.com/scs/substrate-api-client.git?rev=62afbac0be1928681d8c70565fa0cc39a92cf4c8#62afbac0)`
      ... which is depended on by `net v0.1.0 (/home/ville/projects/move-tools/net)`
      ... which is depended on by `dove v1.3.0 (/home/ville/projects/move-tools/dove)`

However, this does not seem to be problem with move-tools since this does not work on tag 1.2.8, which used to work just fine. I have now tried 1.3.0, 1.2.8 and 44c7e88 but to no avail. 1.2.8 and 44c7e88 used to work, I even have 44c7e88 installed:

โžœ  taohe git:(master) โœ— dove --version
Dove 1.3.0-44c7e88

But as said, this does not seem to be move-tools problem, but just reporting this, in case you guys can do something about it ๐Ÿ™‚

Templates for dove doc-gen make more configurable

There's already existing templates but configurable with manifest only.
Would be great to call something like dove doc-gen template to gen template in default place fo future use.
Then you edit the template and then build neat docs with it.

Named addresses not working with Dove run 1.6.0-86817ac

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.

Feature request: conditional compilation

Hello!
Recently the Diem Association (read: Facebook ๐Ÿ˜† ) has been very interested to expand Move support to platforms such as NEAR (in fact, directly sponsored by Facebook).

This can lead to a situation, where a feature (for example: retrieving current time) can be implemented differently on Diem, Pontem and NEAR (since that would be platform specific, not language specific).

So, I would like to request a feature that would permit compiling different files if on a certain platform, and would also include (and exclude) some dependencies accordingly.

For example:

  • If on Diem, would compile DiemHelpers.move implementing Helpers-module, and include diem-stdlib as a dependency.
  • If on Pontem, would compile PontemHelpers.move implementing Helpers-module (and not DiemHelpers.move).
  • Other .move files could then just use Helper::getTime().

(Of course all of this would be project specific, and defined in Dove.toml.)

Dove build not generating binaries upon warnings on 1.6.1

Hello!
It seems that binaries are not produced if warnings are encountered (1.6.1-5ac671a).

Consider the following file, let's call it Invalid.move:

/** invalid documentation comment **/

Running dove build will report:

warning[W01004]: invalid documentation comment
  โ”Œโ”€ ./sources/Invalid.move:1:1
  โ”‚
1 โ”‚ /** invalid documentation comment **/
  โ”‚ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Documentation comment cannot be matched to a language item

While most of the warnings are worth fixing, some warnings don't need fixing: for example generics in script functions, which currently report:

warning[W04022]: script function cannot be invoked with this signature (NOTE: this may become an error in the future)

(Ending up not generating binaries.)

The compilation process itself is not aborted, you can see warnings from multiple files. Final binaries are not generated, though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.