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
Solidity versions get updated regularly yet currently we have a static version hardcoded in the application (0.5.10) & all templates use that version. Attempting to change the version in a project (e.g. 0.6.8) throws an error in the IDE's console:
Using Solidity compiler version 0.5.10
/contracts/Coin.sol:3:1: ParserError: Source file requires different compiler version (current compiler is 0.5.10+commit.5a6ea5b1.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.6.8;
^--------------------^
[ERROR] Ate bad code and died, compilation aborted.
Motivation
Multiple users have requested a way to actually change the selected compiler versions to match their needs
Users may want to demo the code of live projects, which often use outdated Solidity versions
Sam: I think the simplest way (from the user's perspective) would be to parse the user's smart contract & to update the compiler version accordingly. e.g. in the user's contract, if they save their contract with pragma solidity 0.6.8;, the compiler should update to that version. Perhaps we also add the ability to manually set in the preferences modal for the when the contract does not explicitly set the specific version (e.g. pragma solidity >=0.5.0 <0.7.0;).
How to handle multiple contracts?
Sam: This is worth considering but I think as a v1, we don't need to solve for this use case. I suspect (can analytics confirm?) that the vast majority of projects only have 1 smart contract. May be worth solving but might be gnarly. I know Truffle & Buidler both struggle with this issue (projects with multiple smart contracts with different versions of Solidity)
The text was updated successfully, but these errors were encountered:
Summary
Solidity versions get updated regularly yet currently we have a static version hardcoded in the application (
0.5.10
) & all templates use that version. Attempting to change the version in a project (e.g.0.6.8
) throws an error in the IDE's console:Motivation
Describe alternatives you've considered
Additional context
Outstanding questions
pragma solidity 0.6.8;
, the compiler should update to that version. Perhaps we also add the ability to manually set in the preferences modal for the when the contract does not explicitly set the specific version (e.g.pragma solidity >=0.5.0 <0.7.0;
).The text was updated successfully, but these errors were encountered: