Skip to content

Commit d104a1a

Browse files
committedJan 14, 2025
Revert "chore: restore the --no-compile flag in the test solidity task"
This reverts commit dd2bb0a.
1 parent dd2bb0a commit d104a1a

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed
 

‎v-next/hardhat/src/internal/builtin-plugins/solidity-test/index.ts

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ const hardhatPlugin: HardhatPlugin = {
1111
},
1212
tasks: [
1313
task(["test", "solidity"], "Run the Solidity tests")
14-
.addFlag({
15-
name: "noCompile",
16-
description: "Don't compile the project before running the test",
17-
})
1814
.setAction(import.meta.resolve("./task-action.js"))
1915
.build(),
2016
],

‎v-next/hardhat/src/internal/builtin-plugins/solidity-test/task-action.ts

+3-21
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ import {
2121
} from "./helpers.js";
2222
import { testReporter } from "./reporter.js";
2323
import { run } from "./runner.js";
24-
import chalk from "chalk";
2524

26-
interface TestActionArguments {
27-
noCompile: boolean;
28-
}
25+
// eslint-disable-next-line @typescript-eslint/no-empty-interface -- the interface is expected to be expanded in the future
26+
interface TestActionArguments {}
2927

3028
const runSolidityTests: NewTaskActionFunction<TestActionArguments> = async (
31-
{ noCompile },
29+
{},
3230
hre,
3331
) => {
3432
// NOTE: A test file is either a file with a `.sol` extension in the `tests.solidity`
@@ -44,22 +42,6 @@ const runSolidityTests: NewTaskActionFunction<TestActionArguments> = async (
4442
])
4543
).flat(1);
4644

47-
// TODO: Decide either how to support or remove this flag from this task.
48-
//
49-
// One option for supporting it would be to iterate over
50-
// hre.artifacts.getArtifactPaths() (or hre.artifacts.getBuildInfoPaths())
51-
// and find the artifacts matching the rootFilePaths.
52-
//
53-
// However, we currently don't store fsPaths neither in artifacts nor in
54-
// buildInfo, which makes the "matching" operation a bit more complicated.
55-
if (noCompile) {
56-
console.warn(
57-
chalk.yellow(
58-
"The --no-compile flag is currently not supported by the test solidity task. The task will always compile all the test contracts before running them.",
59-
),
60-
);
61-
}
62-
6345
const buildOptions: BuildOptions = {
6446
force: false,
6547
buildProfile: hre.globalOptions.buildProfile,

0 commit comments

Comments
 (0)