Skip to content
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

Error: Unsupported language version '0.8.27'. #5219

Open
majinbot opened this issue Sep 21, 2024 · 2 comments
Open

Error: Unsupported language version '0.8.27'. #5219

majinbot opened this issue Sep 21, 2024 · 2 comments

Comments

@majinbot
Copy link

majinbot commented Sep 21, 2024

Hello, I will get the stack trace printed below if I try running any HH task with your plugin imported in HH config import "@openzeppelin/hardhat-upgrades".

We ruled any HH fault with @alcuadrado, whom just released support for latest solc: NomicFoundation/hardhat#5723

Released in Hardhat v2.22.11.

bun run compile
$ hardhat compile
An unexpected error occurred:

Error: Unsupported language version '0.8.27'.
    at tryRemoveNonStructNatSpec (/home/node_modules/@openzeppelin/upgrades-core/src/utils/make-namespaced.ts:183:22)
    at makeNamespacedInput (/home/node_modules/@openzeppelin/upgrades-core/src/utils/make-namespaced.ts:158:28)
    at OverriddenTaskDefinition._action (/home/node_modules/@openzeppelin/hardhat-upgrades/src/index.ts:102:31)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Environment._runTaskDefinition (/home/node_modules/hardhat/src/internal/core/runtime-environment.ts:351:14)
    at async Environment.run (/home/node_modules/hardhat/src/internal/core/runtime-environment.ts:184:14)
    at async SimpleTaskDefinition.action (/home/node_modules/hardhat/src/builtin-tasks/compile.ts:1024:37)
    at async Environment._runTaskDefinition (/home/node_modules/hardhat/src/internal/core/runtime-environment.ts:351:14)
    at async Environment.run (/home/node_modules/hardhat/src/internal/core/runtime-environment.ts:184:14)
    at async /home/node_modules/hardhat/src/builtin-tasks/compile.ts:464:28 {
  code: 'GenericFailure'
}

💻 Environment

interpreter: Bun 1.1.28

deps:

	"devDependencies": {
		"@biomejs/biome": "^1.9.2",
		"@nomicfoundation/hardhat-foundry": "^1.1.2",
		"@nomicfoundation/hardhat-toolbox": "^5.0.0",
		"@openzeppelin/hardhat-upgrades": "^3.3.0",
		"@typechain/ethers-v6": "^0.5.1",
		"@typechain/hardhat": "^9.1.0",
		"@types/bun": "latest",
		"@types/chai": "^4.3.19",
		"@types/mocha": "^10.0.8",
		"@types/node": "^22.5.5",
		"dotenv": "^16.4.5",
		"ethers": "^6.13.2",
		"hardhat": "^2.22.11",
		"hardhat-contract-sizer": "^2.10.0",
		"tasai": "^1.0.0",
		"ts-node": "^10.9.2"
	},
	"peerDependencies": {
		"typescript": "^5.5.4"
	},
	"dependencies": {
		"@openzeppelin/contracts": "^5.0.2",
		"@openzeppelin/contracts-upgradeable": "^5.0.2"
	}

📝 Details

HH config

    solidity: {
        version: "0.8.27",
        settings: {
            optimizer: {
                enabled: true,
                runs: 999999,
            },
            viaIR: true,
        },
    },
@Juglipaff
Copy link

Juglipaff commented Sep 22, 2024

For me, this is mitigated by manually providing the latest @nomicfoundation/slang commit in package.json, deleting node_modules with package-lock.json, and doing npm i.

"overrides": {
    "@openzeppelin/upgrades-core": {
      "@nomicfoundation/slang": "git://github.com/NomicFoundation/slang.git#15c437c6c4902cd43e0027f750ba59e8f22f47f9"
    }
 }

Note that this is a temporary solution before the new @nomicfoundation/slang version release.

@cairoeth
Copy link
Contributor

@majinbot im not able to replicate the error with the sample hardhat project and the configs you shared. slang released support for v0.8.27 (and also 0.8.28) so i think it should be working ok. can you let me know if the issue persists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants