-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source file requires different compiler version #431
Comments
Are you compiling using forge?, you can set the version in foundry.toml Edit: In vscode-solidity make sure that your workspace settings are the ones you are editing. |
@elanzalaco ^^^ |
@juanfranblanco seems like a bug, remote compiler is locked to 0.8.19 and cant change remote compiler version. Have tried everything |
Seems like this could be a related issue too: |
BTW, just downgraded to v0.0.165 and error has disappeared |
I have just been testing solidity 24, press F1 and go to User Settings. Then Solidity. And check what version you have in workspace and user. Should be Remote in both and the version you require. It looks looks like your workspace is using the embedded compiler. |
@emiliolanzalaco ^^^ Workspace is your project and overrides others |
It appears that this issue persists in the latest version: My {
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.formatter": "forge",
"[solidity]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"solidity.defaultCompiler": "remote",
"solidity.compileUsingRemoteVersion": "v0.8.23+commit.f704f362"
} As a current workaround, I am using a local compiler: {
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.formatter": "forge",
"[solidity]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"solidity.defaultCompiler": "localFile",
"solidity.compileUsingLocalVersion": "/Users/pyk/github/pyk/zkevm-stb/soljson-v0.8.23+commit.f704f362.js"
} |
@juanfranblanco it appears this is a bug as there are a few cases with similar setups. Seems like the compiler is stuck on v0.8.19 irrespective of global or workspace settings. |
Same issue here, both user and workspace are set to either |
plus one, the remote compiler is stuck at 0.8.19 |
This seems to be fixed with the latest update. |
The issue was related to the standalone language server pull, that defaults the values to latest so the server won't require to set any values to start with. Whilst this makes sense, the user values were overridden on vscode as they weren't taking preference for a millisecond and not reloaded. *Latest" has been stuck in 19 on the solidity binaries for a few releases now, and there is nothing it can be done about that. |
Hi, I am having some issues with the compiler version.
I am inside of a basic forge init repo. I am trying to use solidity version 0.8.22 but I am locked to 0.8.19 no matter what settings I choose.
Here is my settings.json inside the workspace:
Here is my solidity file:
And here is my error:
I think this could be a bug. Could someone replicate this?
The text was updated successfully, but these errors were encountered: