-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Hardhat version in buildinfo #8123
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
Changes from 7 commits
42ee064
8e40438
997b6f8
05f1d7f
20d3c45
1317b5f
b05beb6
cf3933b
6d66108
71fb95e
c34efe2
fa53fde
455568c
7cd072e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,15 +173,17 @@ declare module "../../../types/config.js" { | |
| export type SingleVersionBuildProfileUserConfig = | ||
| SolidityCompilerUserConfig & { | ||
| isolated?: boolean; | ||
| toolVersionsInBuildInfo?: boolean; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: We only add this setting to the profiles, and not to every top-level config, as that seems unneeded.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was a bad idea, I'm changing it to make it consistent with the other fields.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| }; | ||
|
|
||
| /** | ||
| * The type of a multi-version build profile user config. | ||
| * Mostly defined in `MultiVersionSolcUserConfig` for backwards compatibility | ||
| */ | ||
| /* eslint-disable-next-line @typescript-eslint/no-empty-interface -- Defined | ||
| in `MultiVersionSolcUserConfig` for backwards compatibility. */ | ||
| export interface MultiVersionBuildProfileUserConfig | ||
| extends MultiVersionSolcUserConfig {} | ||
| extends MultiVersionSolcUserConfig { | ||
| toolVersionsInBuildInfo?: boolean; | ||
| } | ||
|
|
||
| /** | ||
| * The type of the build profile version of the SolidityUserConfig. | ||
|
|
@@ -259,6 +261,7 @@ declare module "../../../types/config.js" { | |
| export interface SolidityBuildProfileConfig { | ||
| isolated: boolean; | ||
| preferWasm: boolean; | ||
| toolVersionsInBuildInfo?: boolean; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Intentionally optional for backwards compatibility, I'll add a comment |
||
| compilers: SolidityCompilerConfig[]; | ||
| overrides: Record<string, SolidityCompilerConfig>; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import type { CompilerInput } from "./compiler-io.js"; | ||
| import type { DependencyGraph } from "./dependency-graph.js"; | ||
| import type { ToolVersions } from "./solidity-artifacts.js"; | ||
| import type { SolidityCompilerConfig } from "../config.js"; | ||
|
|
||
| /** | ||
|
|
@@ -22,6 +23,12 @@ export interface CompilationJob { | |
| */ | ||
| solcLongVersion: string; | ||
|
|
||
| /** | ||
| * The versions to include in the build info, if any. | ||
| * When present, these versions influence the build id. | ||
| */ | ||
| toolVersions?: ToolVersions; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this to the |
||
|
|
||
| /** | ||
| * Returns the solc input to be used. | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,13 @@ | ||
| import type { CompilerInput, CompilerOutput } from "./compiler-io.js"; | ||
|
|
||
| /** | ||
| * A record with the versions of the different tools used to create a | ||
| * build info. | ||
| */ | ||
| export interface ToolVersions { | ||
| readonly hardhat: string; | ||
| } | ||
|
|
||
| /** | ||
| * A SolidityBuildInfo is a file that contains all the information of a solc | ||
| * run. It includes all the necessary information to recreate that exact same | ||
|
|
@@ -43,6 +51,14 @@ export interface SolidityBuildInfo { | |
| */ | ||
| readonly compilerType?: string; | ||
|
|
||
| /** | ||
| * Versions of the different tools used to create this build info. | ||
| * | ||
| * Not present if the build profile used to create this build info | ||
| * had `toolVersionsInBuildInfo` as `false`. | ||
| */ | ||
| readonly versions?: ToolVersions; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you considered using
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i guess it's a good point |
||
|
|
||
| /** | ||
| * A mapping from user source names to input source names, for the root | ||
| * files of the build (i.e. the files whose artifacts where being compiled). | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to add it to
SingleVersionSolidityUserConfigandMultiVersionSolidityUserConfig.