Add support for custom compiler version
See original GitHub issueCurrently, the version ^0.3.5 of solc is used. The solidity compiler does not produce the same results depending on the on the version used. Dapp developpers may want to control which version is used.
The ability to provide a custom version in the config/as option would be great.
Then use this version while invoking the solidity compiler as:
var solcV011 = solc.useVersion('v0.1.1-2015-08-04-6ff4cd6');
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Custom Compiler | Synopsys
The Synopsys Custom Compiler™ design environment is a modern solution for full-custom analog, custom digital, and mixed-signal IC design.
Read more >How to add support for custom android compiler in cmake?
Am using a Customized Android Compiler. That compiles cpp code and generates the .so file. From Command Prompt it is working fine but...
Read more >CPP-9615 - Support for custom compiler - YouTrack
Support for custom compiler : allow to specify supported features, header search paths, defines etc. ; Subsystem, Toolchains ; Affected versions, No Affected ......
Read more >Manage Arm Compiler Versions - µVision User's Guide
Click Add another Arm Compiler Version to List. This opens a Windows browse for folder dialog. Navigate to the folder that contains the...
Read more >Custom Compiler GUI - Valve Developer Community
Collection of compiler definitions/settings. To add settings for a new compiler, select "Compilers" in the tree-view, and click "Add" (to remove ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually, the main reason is not only 0.4.x but exactly what you mentioned about the downgrading.
Compilers do not behave the same, so while it is advised using the latest, sometimes, people prefer to use a given (older) version.
The 0.4.x example you mention is a good one, we should use 0.4.x, but for now we don´t (whatever the reasons are).
I think it would be fair to have such feature, and as you suggest, lock it down, at least for now, to a given set of versions (ie everything < 0.4.x)
To avoid any extra issue reports, I would specifically point to this ticket since you now nicely explained why 0.4.x cannot yet be working 😃
In general I see this as a good feature. However, I’d guess you want this feature so you can bump the version up to solidity 0.4.x, right? If so, this solution will likely cause more problems than it solves.
The main reason Truffle hasn’t been bumped up to version 0.4.x already is because of the introduction of breaking changes: Specifically the
pragma
statement. This is an issue because Truffle uses a library called solidity-parser in order to perform some preprocessing, and solidity-parser needs to be upgraded to support thepragma
statement before you can use 0.4.x with Truffle. If you were to use the proposed feature to upgrade the version to 0.4.x, Truffle will error before compilation ever occurs.Where this feature could be very useful is downgrading the compiler version, or setting a specific compiler version for testing purposes (aka, testing the compiler) or locking your project into a specific version. But it won’t be able to go forward past the latest version Truffle supports (0.3.5 in this case). If we implement this feature, we need to ensure we don’t allow users to go higher than the latest version supported as that will cause unexpected errors.
To better understand your use case, why do you want to specify the version?