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
And then if you configure solidity-coverage with something like this:
module.exports = {
host: 'localhost',
port: 8555,
norpc: false,
testCommand: 'yarn run truffle test --network coverage',
copyPackages: ['zeppelin-solidity']
};
Then something very weird happens. The correct version of zeppelin is copied in the coverageEnv directory, until after the Instrumenting... steps are done, and then the package is reverted to the 1.4 version.
Eg:
If I cat node_modules/zeppelin-solidity/contracts/math/SafeMath.sol, I get the latest from their git repo. Each function is annotated internal pure.
However if I cat cat coverageEnv/node_modules/zeppelin-solidity/contracts/math/SafeMath.solbefore the Instrumenting... steps, the file stays the same but if I do so just after the Instrumenting... steps, the file is reverted to their 1.4 branch version and the functions are incorrectly annotated internal.
What's going on?
The text was updated successfully, but these errors were encountered:
hickscorp
changed the title
Failure to copy package if from a git source.
Weird behavior with packages locked to a git commit
Dec 18, 2017
@hickscorp The removal of the pure modifier during the instrumentation step is intentional. See #146 for more on why this necessary. Agree this is weird but believe coverage is running the zeppelin version you intend, apart from the modifications it makes to contracts in order to execute successfully.
@cgewecke My bad indeed. A coincidence that I was updating a package that adds modifiers to functions, and I thought the version of the package was being reverted. Thanks.
If in your package.json, you have something like this:
And then if you configure
solidity-coverage
with something like this:Then something very weird happens. The correct version of
zeppelin
is copied in thecoverageEnv
directory, until after theInstrumenting...
steps are done, and then the package is reverted to the1.4
version.Eg:
If I
cat node_modules/zeppelin-solidity/contracts/math/SafeMath.sol
, I get the latest from their git repo. Each function is annotatedinternal pure
.However if I cat
cat coverageEnv/node_modules/zeppelin-solidity/contracts/math/SafeMath.sol
before theInstrumenting...
steps, the file stays the same but if I do so just after theInstrumenting...
steps, the file is reverted to their1.4
branch version and the functions are incorrectly annotatedinternal
.What's going on?
The text was updated successfully, but these errors were encountered: