-
Notifications
You must be signed in to change notification settings - Fork 281
Closed
Description
Using 0.4.9.
#161 seems like a pretty reasonable thing to do, and it should work, but I'm having trouble with it on aragonOS.
From what I gather, the problem seems to be from truffle test compiling the contracts again. I see the compiler running three times: once for the original, once for the modified, (at this point the modified's ABI is switched out for the original, and I can verify this in the coverageEnv/builds folder), and then again when truffle test is run.
I'm not familiar with how everything is hooked up in truffle, but running through the code, it seems to be that:
- Running
truffle testwill compile any necessary files with the test files (it first checks for any updated files, and here it doesn't find any) - The compiler is invoked for any necessary files, and then with all the necessary files' dependencies. The only necessary files at this point are the test mocks that we use.
- Now tests are run, with contract artifacts being created, etc. When creating the contract artifacts in the test, truffle checks if the function in the abi is constant or not, and if so, provides the
.call()for us. This last bit is the weird part: I can confirm in thecoverageEnv/buildfolder that the ABIs have been swapped, and that any constant functions are appropriately marked. However, the above check when creating the contract artifacts seems to be failing for a lot of these functions, leading me to think that the re-compile done bytruffle testis causing a newer version of the ABI to be used.
I tried to see if not compiling the tests' dependencies would work... but that started giving me parser/compiler errors D:
Metadata
Metadata
Assignees
Labels
No labels