Cannot use different solc version projects in same workspace
See original GitHub issueI find that compiler.ts
uses vscode.workspace.rootPath
which is actually deprecated.
I believe this causes the extension to always use the solc
compiler of the first project folder in the workspace. This produces errors or warnings when having multiple projects that use different versions of Solidity Compiler in the same workspace.
Using workspaceFolders might give a better result.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
solidity - Source File requires different compiler version
The error implies the installed Solidity compiler is version which is trying to compile your solidity code is v0.
Read more >Cannot change solc compiler version in VSCode
I have attempted to change my compiler version using Juan Blanco's 'Solidity' VSCode extension to "Change global/workspace compiler version ( ...
Read more >Smart Contract Automated Testing Guidelines - Packet Storm
You need to just switch the version of solc quickly by a command. The version of solc is kindda painful, depending on the...
Read more >"Could not find import from any sources" error - Contracts
I'm tryinng to compile a token contract on truffle, and get the error: Error: Error: Could not find import from any sources; imported...
Read more >Compiling your contracts | Ethereum development ... - Hardhat
To compile your contracts in your Hardhat project, use the ... Hardhat will automatically download the versions of solc that you set up....
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 FreeTop 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
Top GitHub Comments
Yes, my bet is on vscode to support it out of the box. I personally see myself needing those specific settings for those projects of different languages (solidity / c# / Nethereum) and funnily enough I guess common workspace setting for both for integration.
Yeah, this could mess up things a bit; could be a lot of work. But I do think
workspaceFolders[]
could be helpful in some way.Hoping for such a feature to be added in the near future either by support from vscode or as a new feature from the extension.