-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(iota-procotol, iota-adapter-tx-tests): Update how we handle type errors in some commands #5664
Open
Dkwcs
wants to merge
7
commits into
vm-lang/upstream-nov-dic-24
Choose a base branch
from
vm-lang/Update-handling-errors-in-some-commands
base: vm-lang/upstream-nov-dic-24
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5b227f5
feat(iota-procotol, iota-adapter-tx-tests): Update how we handle type…
Dkwcs 34f7e12
fmt
Dkwcs d354553
uppdate tests
Dkwcs 4e5aea7
test fi
Dkwcs 1f6b14e
fix tests
Dkwcs 5449a70
update snapshots
Dkwcs 68b5e67
Add version protocol comment
Dkwcs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
crates/iota-adapter-transactional-tests/tests/programmable/make_vec_non_existent_type.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
processed 3 tasks | ||
|
||
init: | ||
A: object(0,0) | ||
|
||
task 1, lines 8-9: | ||
//# programmable --sender A | ||
//> 0: MakeMoveVec<std::string::utf8>([]); | ||
Error: Transaction Effects Status: Error for type argument at index 0: A type was not found in the module specified. | ||
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: TypeArgumentError { argument_idx: 0, kind: TypeNotFound }, source: None, command: Some(0) } } | ||
|
||
task 2, lines 11-12: | ||
//# programmable --sender A --inputs 1 | ||
//> 0: MakeMoveVec<std::string::utf8>([Input(0)]); | ||
Error: Transaction Effects Status: Error for type argument at index 0: A type was not found in the module specified. | ||
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: TypeArgumentError { argument_idx: 0, kind: TypeNotFound }, source: None, command: Some(0) } } |
12 changes: 12 additions & 0 deletions
12
crates/iota-adapter-transactional-tests/tests/programmable/make_vec_non_existent_type.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// Modifications Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
|
||
//# init --addresses test=0x0 --accounts A | ||
|
||
//# programmable --sender A | ||
//> 0: MakeMoveVec<std::string::utf8>([]); | ||
|
||
//# programmable --sender A --inputs 1 | ||
//> 0: MakeMoveVec<std::string::utf8>([Input(0)]); |
16 changes: 16 additions & 0 deletions
16
crates/iota-adapter-transactional-tests/tests/programmable/make_vec_non_existent_type_v4.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
processed 3 tasks | ||
|
||
init: | ||
A: object(0,0) | ||
|
||
task 1, lines 8-9: | ||
//# programmable --sender A | ||
//> 0: MakeMoveVec<std::string::utf8>([]); | ||
Error: Transaction Effects Status: MOVE VM INVARIANT VIOLATION. | ||
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: VMInvariantViolation, source: Some(VMError { major_status: TYPE_RESOLUTION_FAILURE, sub_status: None, message: Some("Cannot find std::string::utf8 in cache"), exec_state: None, location: Undefined, indices: [], offsets: [] }), command: Some(0) } } | ||
|
||
task 2, lines 11-12: | ||
//# programmable --sender A --inputs 1 | ||
//> 0: MakeMoveVec<std::string::utf8>([Input(0)]); | ||
Error: Transaction Effects Status: MOVE VM INVARIANT VIOLATION. | ||
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: VMInvariantViolation, source: Some(VMError { major_status: TYPE_RESOLUTION_FAILURE, sub_status: None, message: Some("Cannot find std::string::utf8 in cache"), exec_state: None, location: Undefined, indices: [], offsets: [] }), command: Some(0) } } |
12 changes: 12 additions & 0 deletions
12
...es/iota-adapter-transactional-tests/tests/programmable/make_vec_non_existent_type_v4.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// Modifications Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
|
||
//# init --addresses test=0x0 --accounts A --protocol-version 4 | ||
|
||
//# programmable --sender A | ||
//> 0: MakeMoveVec<std::string::utf8>([]); | ||
|
||
//# programmable --sender A --inputs 1 | ||
//> 0: MakeMoveVec<std::string::utf8>([Input(0)]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we change the protocol configuration, it is necessary to add a description in the following section:
P.S. We need to check this description when all the related issues are fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done