You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using clarinet console and defining new variables, if two conflicting variables definitions happens on different inputs, this will crash the console:
>> (define-data-var my-number uint u0)
none
>> (define-data-var my-number uint u1)
thread 'main' panicked at 'Metadata entry 'vm-metadata::6::my-number' already exists for contract: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.contract-19', /Users/someuser/.cargo/registry/src/github.com-1ecc6299db9ec823/clarity-vm-2.1.1/./src/vm/database/clarity_db.rs:567:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Paste second contract variable definition (define-data-var my-number uint u1)
main thread panic seen.
Expected behavior
main thread panicking like:
thread 'main' panicked at 'Metadata entry 'vm-metadata::6::my-number' already exists for contract: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.contract-19', /Users/someuser/.cargo/registry/src/github.com-1ecc6299db9ec823/clarity-vm-2.1.1/./src/vm/database/clarity_db.rs:567:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Environment (please complete the following information):
OS (version): macOS (13.4.1)
Docker version: 23.0.5
Clarinet version: 1.7.1
Additional context
Does not seems to affect deployment because a contract with the 2 conflicting definitions gives (err ..) on console integrate deployment. Complete trace follows.
thread 'main' panicked at 'Metadata entry 'vm-metadata::6::my-number' already exists for contract: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.contract-1', /Users/joseignacio/.cargo/registry/src/github.com-1ecc6299db9ec823/clarity-vm-2.1.1/./src/vm/database/clarity_db.rs:567:13
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: clarity::vm::database::clarity_db::ClarityDatabase::create_variable
3: clarity::vm::eval_all
4: clarity::vm::contexts::GlobalContext::execute
5: clarity_repl::repl::interpreter::ClarityInterpreter::execute
6: clarity_repl::repl::interpreter::ClarityInterpreter::run
7: clarity_repl::repl::session::Session::eval
8: clarity_repl::repl::session::Session::formatted_interpretation
9: clarity_repl::repl::session::Session::run_snippet
10: clarity_repl::repl::session::Session::handle_command
11: clarity_repl::frontend::terminal::Terminal::start
12: clarinet::frontend::cli::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using
clarinet console
and defining new variables, if two conflicting variables definitions happens on different inputs, this will crash the console:To Reproduce
Steps to reproduce the behavior:
clarinet new my-project && cd my-project
(define-data-var my-number uint u1)
Expected behavior
main thread panicking like:
Environment (please complete the following information):
Additional context
Does not seems to affect deployment because a contract with the 2 conflicting definitions gives
(err ..)
onconsole integrate
deployment. Complete trace follows.The text was updated successfully, but these errors were encountered: