question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use different solc version projects in same workspace

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
juanfranblancocommented, Jul 26, 2019

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.

0reactions
sebastiantfcommented, Jul 26, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found