Open brmataptos opened 6 months ago
This is related to #13392. Namely, the problem is that the transactional tests just simulate publishing code, but don't really publish it anywhere. This means we have to treat the previous code as a "to be compiled" source, but if there is a conflict with the later source we have a problem.
@wrwg @brmataptos, this error happens because when running expansion phase in V2, all modules lib_definitions
are moved to source_definitions
. If a module in lib_definitions
has the same address and same name as an existing module in source_definitions
, the error Duplicate definition for module
will be raised.
We need to test this case when building a new module when there is an existing module of the same name and address on-chain already. Maybe this just works due to the package builder, but we need to test module upgrade cases as would be done by real users.
See
in #13216 .
There might be some problem with the test harness, but
task 4
of the test case fails compilation withMOVE_COMPILER_V2=true
.