-
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
[Compiler-v2] Fix test plan in move-unit-test to use compiler v2 #15388
Conversation
⏱️ 1h 50m total CI duration on this PR
🚨 1 job on the last run was significantly faster/slower than expected
|
80986e1
to
4f904cb
Compare
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.
Thanks for the fix, let's get this in soon please :)
│ │ | ||
│ 36 │ fun test_doesnt_exist() { | ||
│ │ ----------------- In this function in 0x1::M | ||
│ · | ||
│ 47 │ abort 0 | ||
│ │ ^^^^^^^ Test was not expected to error, but it aborted with code 0 originating in the module 0000000000000000000000000000000000000000000000000000000000000001::M rooted here | ||
│ 43 │ i = i + 1; |
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.
I am guessing this is because of peephole as well, if we can get this PR merged in, I can rebase and further validate the peephole locations fix.
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.
Looks ok, but please check what happens if there is a compile error for the tests.
@@ -147,7 +147,7 @@ Creates a new function info from names. | |||
|
|||
|
|||
|
|||
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="function_info.md#0x1_function_info_new_function_info_from_address">new_function_info_from_address</a>(module_address: <b>address</b>, module_name: <a href="../../../aptos-stdlib/../move-stdlib/tests/compiler-v2-doc/string.md#0x1_string_String">string::String</a>, function_name: <a href="../../../aptos-stdlib/../move-stdlib/tests/compiler-v2-doc/string.md#0x1_string_String">string::String</a>): <a href="function_info.md#0x1_function_info_FunctionInfo">function_info::FunctionInfo</a> | |||
<pre><code><b>public</b> <b>fun</b> <a href="function_info.md#0x1_function_info_new_function_info_from_address">new_function_info_from_address</a>(module_address: <b>address</b>, module_name: <a href="../../../aptos-stdlib/../move-stdlib/tests/compiler-v2-doc/string.md#0x1_string_String">string::String</a>, function_name: <a href="../../../aptos-stdlib/../move-stdlib/tests/compiler-v2-doc/string.md#0x1_string_String">string::String</a>): <a href="function_info.md#0x1_function_info_FunctionInfo">function_info::FunctionInfo</a> |
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.
I don't like this backtracking, though it's also generated by V1. Filed an issue for it. #15392
let (units, warnings) = | ||
diagnostics::unwrap_or_report_diagnostics(&files, compilation_result); | ||
diagnostics::report_warnings(&files, warnings); | ||
test_plan.map(|tests| TestPlan::new(tests, files, units)) |
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.
Last line is common for the 2 branches. It might be better to wrap the whole if
in a let (test_plan, files, units) = if ...
and have a single such line. I'm actually a little surprised we don't have more in common.
Maybe we didn't before, but we also should bail out if there are errors.
4f904cb
to
26b261a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
This PR closes #15385 by explicitly using test plan builder v2 in
move-unit-test
whenMOVE_COMPILER_V2
is set to true.How Has This Been Tested?
Existing test cases in
move-unit-test
, see updated baseline files.Key Areas to Review
Whether flags are correctly set when running tests using Compiler v2.
Type of Change
Which Components or Systems Does This Change Impact?
Checklist