Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 8df3b12 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
This was referenced Nov 26, 2026
kanej
reviewed
Nov 27, 2026
Comment on lines
+46
to
+48
| const parsedInstrumentationVersion = parseVersion(instrumentationVersion, { | ||
| allowPrerelease: true, | ||
| }); |
Member
There was a problem hiding this comment.
I am happy that pre-release version info isn't relevant for coverage. EDR will fallback to the latest solc version (used for parsing info for slang) if an unknown version is passed.
This branch has not been 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.
Closes #8886
Lets users opt into solc prerelease compilers published in the official binary lists, e.g.:
Changes
@nomicfoundation/hardhat-utilsfast-semver.parseVersion(version, { allowPrerelease }): a new opt-in option that accepts and strips a-prereleasesuffix. The default stays strict, so existing callers are unaffected.hardhatcompiler/downloader.ts: builds are identified bygetBuildVersion(build), which isversionfor releases andversion-prereleasefor prereleases. This replaces theprerelease === undefinedfilters in#getCompilerBuildand#shouldDownloadCompilerList. The zipped-Windows extraction directory and the download log line use the same identifier, so a prerelease never collides with its release.solc-config-selection.ts: everysatisfies/maxSatisfying/intersectscall passes{ includePrerelease: true }. Only configured compilers are candidates, so this changes nothing unless a prerelease is configured. With the flag, semver agrees with solc's own pragma check. I verified this against the0.9.0-pre.1binary for^0.8.20,>=0.8.20,^0.9.0,>=0.9.0and>=0.8.20 <0.10.0.solc-info.ts,compiler/compiler.ts,compiler/solcjs-wrapper.ts,coverage/instrumentation.ts: these feature-gate parses useallowPrerelease: true, so0.9.0-pre.1gates like0.9.0.Behaviour notes
"0.8.35"still resolves to the 0.8.35 release even though0.8.35-pre.1is in the list (covered by a test).maxSatisfyingpicks the higher one, as for any other pair of configured compilers. Example: with["0.8.35", "0.9.0-pre.1"]and pragma>=0.8.20, it picks0.9.0-pre.1. This is intended: the prerelease was explicitly configured.defaultEvmTargets, including 0.9.0. That's existing behaviour for new versions and is independent of this PR.Tests
hardhat-utils/test/fast-semver.ts:allowPrereleaseparsing.solc-config-selection.ts: prerelease selection, prerelease override, and prerelease ranked below its release (^0.8.0,>=0.9.0,^0.9.0don't match).compiler/downloader.ts(slow tests):0.8.35doesn't pick0.8.35-pre.1;0.9.0-pre.1downloads and hasversion === "0.9.0-pre.1"andlongVersion === "0.9.0-pre.1+commit.91c99213".version: "0.9.0-pre.1"compiles a>=0.8.20contract, and a^0.8.20file gets the usual HHE909 incompatibility error.