From b05223b9c6877af0677ea73f03ff726950adb90f Mon Sep 17 00:00:00 2001 From: wisechengyi Date: Mon, 10 Feb 2020 14:27:15 -0800 Subject: [PATCH 1/2] Use spec-file instead --- .../intellij/pants/service/PantsCompileOptionsExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java b/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java index 150c856cd..69d4814af 100644 --- a/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java +++ b/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java @@ -212,7 +212,7 @@ private GeneralCommandLine getPantsExportCommand(final File outputFile, @NotNull targetSpecsFileWriter.write('\n'); } } - commandLine.addParameter("--target-spec-file=" + targetSpecsFile.getPath()); + commandLine.addParameter("--spec-file=" + targetSpecsFile.getPath()); commandLine.addParameter("--no-quiet"); if (PantsUtil.isCompatiblePantsVersion(getProjectPath(), "1.24.0")) { From 1bd587335d051c4e342fa45e59f02194a3f43913 Mon Sep 17 00:00:00 2001 From: wisechengyi Date: Mon, 10 Feb 2020 14:30:18 -0800 Subject: [PATCH 2/2] more --- .../pants/service/PantsCompileOptionsExecutor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java b/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java index 69d4814af..0222c911d 100644 --- a/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java +++ b/src/com/twitter/intellij/pants/service/PantsCompileOptionsExecutor.java @@ -212,7 +212,12 @@ private GeneralCommandLine getPantsExportCommand(final File outputFile, @NotNull targetSpecsFileWriter.write('\n'); } } - commandLine.addParameter("--spec-file=" + targetSpecsFile.getPath()); + if (PantsUtil.isCompatiblePantsVersion(getProjectPath(), "1.25.0")) { + commandLine.addParameter("--spec-file=" + targetSpecsFile.getPath()); + } + else { + commandLine.addParameter("--target-spec-file=" + targetSpecsFile.getPath()); + } commandLine.addParameter("--no-quiet"); if (PantsUtil.isCompatiblePantsVersion(getProjectPath(), "1.24.0")) {