From 4db2c660b317d3ea3dde3d189c43122672306470 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 20 Nov 2024 23:53:46 +0800 Subject: [PATCH] [Dart] Increase min SDK to last Dart 1 release --- .../lang/dart/analyzer/DartAnalysisServerService.java | 6 ++---- .../introduce/DartServerExtractLocalVariableHandler.java | 6 ------ .../jetbrains/lang/dart/pubServer/PubServerPathHandler.kt | 6 ------ 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Dart/src/com/jetbrains/lang/dart/analyzer/DartAnalysisServerService.java b/Dart/src/com/jetbrains/lang/dart/analyzer/DartAnalysisServerService.java index 9c3f1e9f23b..a4c97e26a97 100644 --- a/Dart/src/com/jetbrains/lang/dart/analyzer/DartAnalysisServerService.java +++ b/Dart/src/com/jetbrains/lang/dart/analyzer/DartAnalysisServerService.java @@ -79,7 +79,7 @@ import java.util.concurrent.TimeUnit; public final class DartAnalysisServerService implements Disposable { - public static final String MIN_SDK_VERSION = "1.12"; + public static final String MIN_SDK_VERSION = "1.24"; private static final String MIN_MOVE_FILE_SDK_VERSION = "2.3.2"; private static final String COMPLETION_2_SERVER_VERSION = "1.33"; @@ -1956,9 +1956,7 @@ private void analysis_setSubscriptions() { subscriptions.put(AnalysisService.NAVIGATION, myVisibleFileUris); subscriptions.put(AnalysisService.OVERRIDES, myVisibleFileUris); subscriptions.put(AnalysisService.OUTLINE, myVisibleFileUris); - if (StringUtil.compareVersionNumbers(mySdkVersion, "1.13") >= 0) { - subscriptions.put(AnalysisService.IMPLEMENTED, myVisibleFileUris); - } + subscriptions.put(AnalysisService.IMPLEMENTED, myVisibleFileUris); if (DartClosingLabelManager.getInstance().getShowClosingLabels() && StringUtil.compareVersionNumbers(mySdkVersion, "1.25.0") >= 0) { subscriptions.put(AnalysisService.CLOSING_LABELS, myVisibleFileUris); diff --git a/Dart/src/com/jetbrains/lang/dart/ide/refactoring/introduce/DartServerExtractLocalVariableHandler.java b/Dart/src/com/jetbrains/lang/dart/ide/refactoring/introduce/DartServerExtractLocalVariableHandler.java index 2021ec565d4..2b2af4653a2 100644 --- a/Dart/src/com/jetbrains/lang/dart/ide/refactoring/introduce/DartServerExtractLocalVariableHandler.java +++ b/Dart/src/com/jetbrains/lang/dart/ide/refactoring/introduce/DartServerExtractLocalVariableHandler.java @@ -28,7 +28,6 @@ import com.jetbrains.lang.dart.ide.refactoring.ServerRefactoringDialog; import com.jetbrains.lang.dart.ide.refactoring.status.RefactoringStatus; import com.jetbrains.lang.dart.psi.DartExpression; -import com.jetbrains.lang.dart.sdk.DartSdk; import org.dartlang.analysis.server.protocol.SourceChange; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -45,11 +44,6 @@ public void invoke(@NotNull Project project, PsiElement @NotNull [] elements, Da @Override public void invoke(final @NotNull Project project, final Editor editor, PsiFile file, DataContext dataContext) { - final DartSdk sdk = DartSdk.getDartSdk(project); - if (sdk == null || StringUtil.compareVersionNumbers(sdk.getVersion(), "1.14") < 0) { - return; - } - if (editor == null || file == null) { return; } diff --git a/Dart/src/com/jetbrains/lang/dart/pubServer/PubServerPathHandler.kt b/Dart/src/com/jetbrains/lang/dart/pubServer/PubServerPathHandler.kt index 41022440ab0..5d78fc62667 100644 --- a/Dart/src/com/jetbrains/lang/dart/pubServer/PubServerPathHandler.kt +++ b/Dart/src/com/jetbrains/lang/dart/pubServer/PubServerPathHandler.kt @@ -13,7 +13,6 @@ import com.intellij.util.io.isRegularBrowser import com.intellij.util.io.origin import com.intellij.util.io.referrer import com.intellij.util.io.userAgent -import com.jetbrains.lang.dart.sdk.DartSdk import com.jetbrains.lang.dart.util.DartUrlResolver import com.jetbrains.lang.dart.util.PubspecYamlUtil import io.netty.channel.ChannelHandlerContext @@ -49,11 +48,6 @@ private class PubServerPathHandler : WebServerPathHandlerAdapter() { return false } - val sdk = DartSdk.getDartSdk(project) - if (sdk == null || StringUtil.compareVersionNumbers(sdk.version, "1.6") < 0) { - return false - } - val servedDirAndPathForPubServer = getServedDirAndPathForPubServer(project, path) ?: return false PubServerManager.getInstance(project).send(context.channel(), request, validateResult, servedDirAndPathForPubServer.first, servedDirAndPathForPubServer.second)