JoinColony / solcover

Code coverage for solidity
MIT License
64 stars 8 forks source link

Upgrade to solc 0.4.8 #51

Closed area closed 7 years ago

area commented 7 years ago

contract A {
    event E(uint x);
}

contract B is A {
    event E(uint x);
    function f() {
        E(10);
    }
}

This compiles in 0.4.6, but not in 0.4.8. And unfortunately, if this isn't a bug, this make our job extremely difficult AKA impossible.

area commented 7 years ago

This appears to have been deliberately broken with https://github.com/ethereum/solidity/commit/3ff65bd9e34e030f86b77cdb6ad9b1cef3448f68 and then fixed in https://github.com/ethereum/solidity/pull/1245 , so I would expect Solidity 0.4.9 to work again for us, which makes me a relieved soul indeed!

EDIT: This compiles again in the most recent versions of 0.4.9 on the online solidity compiler, so this looks like it's going to resolve itself without any more effort on our part.

Phew

area commented 7 years ago

This is actually an issue for us now, because Truffle installs solc matching ^0.4.4, so trying to run tests with those instrumented contracts won't work if they've installed truffle since 0.4.8 came out...

cgewecke commented 7 years ago

Maybe it's reasonable to open an issue or even a PR in Truffle (although they have a lot of them.) 0.4.6 is just wrong behavior, right?

area commented 7 years ago

0.4.6 shows the right behaviour, 0.4.8 (latest release) shows the wrong behaviour. I've found a relevant issue in Truffle about controlling the version used for compilation, so maybe I'll bump that.

cgewecke commented 7 years ago

👍

area commented 7 years ago

0.4.9 is out, so I'm hoping we're back in business!

cgewecke commented 7 years ago

--network's in on Truffle 3 test too, you're in the money this week! That should help a lot.

area commented 7 years ago

Unfortunately, due to changes in solc-js 0.4.9, Truffle's now pinned at solc-js v0.4.8, so we need to wait for that to be resolved :disappointed:

cgewecke commented 7 years ago

@area What's your view of forking truffle and truffle-compile, downgrading solc, shipping solcover with these versions and running them locally to generate the coverage, as a stopgap?

Have thought about opening a PR in truffle to add the compiler option but it's kind of insane (or genius) over there now - everything is broken up into different repos and something like that would be 3 or 4 separate pieces that probably break CI, plus waiting, etc. Might be worthwhile though - they'll have to upgrade eventually . . .

Project seems so close to being publishable and it's obviously really valuable - the output is great and runCovered just needs some error catching and basic tests or whatever. Have just finished a front-end contract - I have free time if you're into working on this more.

cgewecke commented 7 years ago

Oh I see in the Gitter he's going to put new solc in soon anyway, that's great - never mind the previous.

area commented 7 years ago

Yeah, I'm on tenterhooks!