Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 01f81ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Amxx
force-pushed
the
chore/solc-0.9.0-pre.1
branch
from
November 26, 2026 22:28
92bb328 to
01f81ef
Compare
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This doesn't work as-is. solc
0.9.0-pre.1can't be used out of the box: Hardhat needs an update before it supports prerelease compilers (NomicFoundation/hardhat#8887), and forge-std needs one before it accepts 0.9 (foundry-rs/forge-std#952). Until then this PR relies on a local binary and a workaround plugin, and the default build expectssolc-linux-amd64-v0.9.0-pre.1+commit.91c99213inPATH, which CI doesn't have.Moves
next-v6.0to Solidity 0.9, using0.9.0-pre.1until 0.9.0 is released.Changes
^0.8.xpragma (contracts, mocks, tests, fv harnesses, generator templates, upgradeable aliases) becomes>0.8.999 <0.10.0. solc can't parse a prerelease tag in a pragma and ranks0.9.0-pre.1below0.9.0, so^0.9.0rejects the prerelease.>0.8.999 <0.10.0means "^0.9.0, prereleases included". It should become^0.9.0once 0.9.0 is released.>=pragmas on interfaces are unchanged.hardhat.config.ts: the compiler label defaults to0.9.0. A new--solcoption (absolute path or name looked up inPATH, defaultsolc-linux-amd64-v0.9.0-pre.1+commit.91c99213) sets the compilerpath.--solc ''goes back to downloading--compiler.foundry.toml:solc_version = '0.9.0-pre.1'. Foundry downloads prereleases through svm, so no local binary is needed there (CI included).hardhat/hardhat-local-solc(new, temporary): Hardhat's local-binary support fails to parse the--versionoutput of prerelease builds. This plugin handles local binaries through thegetCompilerhook, and provides acompileBuildInfohelper for the places that recompile outside the build pipeline.hardhat-exposed,hardhat-yul: use that helper, becausehre.solidity.compileBuildInfoalways downloads the solc version recorded in the build info and ignorespath.scripts/solc-versions.js: latest 0.8 is now 0.8.39, and0.9.0-pre.1is added. Prereleases are listed as-is instead of being expanded to every patch.scripts/solc-versions.js: newtoPragmahelper. solc can't parse prerelease tags, so a prerelease minimum is written as a range that includes it (^0.9.0-pre.1becomes>0.8.999 <0.10.0). NewminSatisfyingVersionhelper, andsatisfieswith prereleases included, which matches solc.minimize-pragma.js: implementations now default to a minimum of0.9.0-pre.1, range pragmas are matched when rewriting, and pragmas are built withtoPragma.checks/pragma-validity.js: compiles with the lowest known version accepted by the pragma, instead ofsemver.minVersion(which gives0.8.1000for>0.8.999).get-contracts-metadata.js: reads range pragmas (the AST literals join into>0.8.999<0.10.0).package.json: thepragmaandtest:pragmabuilds skip the Foundry tests (--no-tests), which they don't use and which forge-std currently blocks.AccessControl.sol: fix a pre-existing import-order lint error (from RemoveContextandERC-2771#6717) caught by the pre-commit hook.Current status
npx hardhat build --no-testscompiles all 719 files and generates the exposed contracts with0.9.0-pre.1. Build info records0.9.0-pre.1+commit.91c99213.npx hardhat test mocha --no-compile(856 tests: AccessManager, Governor, ERC20, Multicall, ECDSA, SimulatedCall).forge build --skip test --skip scriptcompiles all 383 files with0.9.0-pre.1.npx hardhat build/npx hardhat testwithout the flags above fail on the Foundry tests, because forge-std pins<0.9.0.Blockers toward the 0.9.0 transition
0.9.0-pre.1(no source change needed beyond pragmas)>0.8.999 <0.10.0, this PR)0.9.0-pre.1) NomicFoundation/hardhat#8886, Support solc prereleases NomicFoundation/hardhat#8887. Once released, bump Hardhat and drophardhat/hardhat-local-solcand--solc.lib/forge-std. This unblocks.t.solcompilation in both Hardhat and Foundry. Foundry itself already handles the prerelease.foundry.tomluses0.9.0-pre.1, downloaded by Foundry itself (this PR)fv/harnesses and prover config run on 0.9scripts/solc-versions.jslists 0.8.39 and0.9.0-pre.1(this PR)npm run pragmawrites>0.8.999 <0.10.0for prerelease minimums, andnpm run test:pragmapasses (193 implementation files compiled with0.9.0-pre.1)^0.8.xpragmas^0.9.0and the compiler config to the released version