-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Bug][compiler-v2] Coverage testing DevEx issues #15117
Comments
Per https://x.com/wgrieskamp/status/1851647160040948098, I gathered that this requires a I just verified that coverage does indeed work with Note too that coverage against source is also broken, I've updated the issue description/title accordingly |
enum
type and is
expression break the coverage toolenum
type and is
expression break the coverage tool for default cause
enum
type and is
expression break the coverage tool for default cause
Could you say in what way is the For some simple examples using enums, using |
@vineethk here's shell output for reproducing (base) ~ % cd repos/econia-v5/src/move/research/red-black-map/variants/b
(base) b % aptos move test --coverage --move-2 --dev
INCLUDING DEPENDENCY AptosFramework
INCLUDING DEPENDENCY AptosStdlib
INCLUDING DEPENDENCY MoveStdlib
BUILDING RedBlackMap
warning: unused alias
┌─ /Users/alex/repos/econia-v5/src/move/research/red-black-map/variants/b/sources/red_black_map.move:4:14
│
4 │ use std::debug;
│ ^^^^^ Unused 'use' of alias 'debug'. Consider removing it
Running Move unit tests
[ PASS ] 0xabc::red_black_map::test_bulk_insertions
[ PASS ] 0xabc::red_black_map::test_search_insert_cases
Test result: OK. Total tests: 2; passed: 2; failed: 0
warning: unused alias
┌─ /Users/alex/repos/econia-v5/src/move/research/red-black-map/variants/b/sources/red_black_map.move:4:14
│
4 │ use std::debug;
│ ^^^^^ Unused 'use' of alias 'debug'. Consider removing it
warning: unused alias
┌─ /Users/alex/repos/econia-v5/src/move/research/red-black-map/variants/b/sources/red_black_map.move:5:14
│
5 │ use std::vector;
│ ^^^^^^ Unused 'use' of alias 'vector'. Consider removing it
+-------------------------+
| Move Coverage Summary |
+-------------------------+
Module 0000000000000000000000000000000000000000000000000000000000000abc::red_black_map
>>> % Module coverage: 96.86
+-------------------------+
| % Move Coverage: 96.86 |
+-------------------------+
Please use `aptos move coverage -h` for more detailed source or bytecode test coverage of this package
{
"Result": "Success"
}
(base) b % aptos move coverage source --module red_black_map --dev --move-2
warning: unused alias
┌─ /Users/alex/repos/econia-v5/src/move/research/red-black-map/variants/b/sources/red_black_map.move:4:14
│
4 │ use std::debug;
│ ^^^^^ Unused 'use' of alias 'debug'. Consider removing it
warning: unused alias
┌─ /Users/alex/repos/econia-v5/src/move/research/red-black-map/variants/b/sources/red_black_map.move:5:14
│
5 │ use std::vector;
│ ^^^^^^ Unused 'use' of alias 'vector'. Consider removing it
thread 'main' panicked at third_party/move/tools/move-coverage/src/source_coverage.rs:333:69:
attempt to subtract with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
Summary: Using But there are 2 related issues brought up in the discussions above:
|
Captured at #15124
Should this issue suffice for tracking this? |
Yes, thank you. |
@brmataptos @fEst1ck @georgemitenkov @rahxephon89 @runtian-zhou @vineethk @wrwg
--move-2
flag DevExI am trying to run
aptos move test --coverage
for this commit of an ongoing Move v2 red-black tree implementation, but it is failing with the following trace:EDIT: Per #15117 (comment), tests pass for
aptos move test --coverage --move-2 --dev
, but is there a way to eliminate the need to pass--move-2
all over the place? (now captured at #15124)Coverage against source is broken
aptos move coverage source --module red_black_map --dev --move-2
is broken (but displaying against bytecode works)The text was updated successfully, but these errors were encountered: