juanfranblanco / vscode-solidity

Visual Studio Code language support extension for Solidity smart contracts in Ethereum https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
MIT License
896 stars 192 forks source link

[feature request] Load solc version from project config files #463

Open 3esmit opened 4 weeks ago

3esmit commented 4 weeks ago

There is no easy way of doing this... To make it even harder, this extension dont accept solc binary, must be solc-js.

In our projects we are having to update the solc version in two places, maybe even in 3 depending the framework.

I created a pre-commit hook just to keep in sync so I dont forget to change it on the extension settings. It seems like it would be trivial to have a config in the extension that is the default, to use solc from project settings. Read files like foundry.toml, truffle.js, and others to set the solc version should be simple.

Foundry does not use solcjs, so it does not install solc in node_modules. It uses embedded svm.

juanfranblanco commented 2 days ago

Yes the issue is that there is not a real standard, now that some performance issues are solved, i will move to load the settings from any other toolset, or maybe adding yet another file that will be synced written from those. The plan is to start with foundry.