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
I started getting recently these kind of errors on deployment:
error: unbound module
┌─ /home/.../move/https___github_com_aptos-labs_aptos-core_git_main/aptos-move/framework/aptos-framework/sources/function_info.move:99:12
│
99 │ friend aptos_framework::function_info_tests;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Unbound module '(aptos_framework=0x1)::function_info_tests'
The text was updated successfully, but these errors were encountered:
I've managed to see this problem intermittently but can't reproduce it reliably. I think that (1) the libraries are being built without #[test_only] code, but then a user #[test] function which includes module aptos_framework::function_info may wind up parsing the #[test_only] friend ... at the end of that module which refers to a module (function_info_tests) which doesn't exist in the current compilation environment. The right solution may be to fix the compiler to silently ignore a friend declaration referring to an unknown module.
and file aptos-move/framework/aptos-framework/sources/function_info.move has:
/// The `function_info` module defines the `FunctionInfo` type which simulates a function pointer.
module aptos_framework::function_info {
...
// Test only dependencies so we can invoke those friend functions.
#[test_only]
friend aptos_framework::function_info_tests;
}
I think the problem is that (1) the #[test_only] code is excluded from the compiled Aptos Framework, but the
This has been hard to reproduce, but I found it happening in a case where I had files from a previous build/tool left behind in a Move package build/ directory, which were found by the move-package mechanism to search for dependency source files.
🐛 Bug
@movekevin reports that a user reports:
The text was updated successfully, but these errors were encountered: