mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Removed obsolete "Converting old skeletons" warning (PY-13507)
Changes in skeletons versioning happend several versions ago, it's time to remove this warning.
This commit is contained in:
@@ -32,7 +32,6 @@ import com.intellij.openapi.projectRoots.SdkModificator;
|
||||
import com.intellij.openapi.projectRoots.SdkTypeId;
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.startup.StartupActivity;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -149,7 +148,7 @@ public class PythonSdkUpdater implements StartupActivity {
|
||||
}
|
||||
|
||||
public static void updateSdk(@Nullable Project project, @Nullable Component ownerComponent, @NotNull final Sdk sdk, String skeletonsPath) throws InvalidSdkException {
|
||||
PySkeletonRefresher.refreshSkeletonsOfSdk(project, ownerComponent, skeletonsPath, new Ref<Boolean>(false), sdk); // NOTE: whole thing would need a rename
|
||||
PySkeletonRefresher.refreshSkeletonsOfSdk(project, ownerComponent, skeletonsPath, sdk); // NOTE: whole thing would need a rename
|
||||
if (!PySdkUtil.isRemote(sdk)) {
|
||||
updateSysPath(sdk);
|
||||
}
|
||||
|
||||
@@ -19,9 +19,6 @@ import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.notification.Notification;
|
||||
import com.intellij.notification.NotificationType;
|
||||
import com.intellij.notification.Notifications;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -31,7 +28,6 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -116,7 +112,6 @@ public class PySkeletonRefresher {
|
||||
public static void refreshSkeletonsOfSdk(@Nullable Project project,
|
||||
Component ownerComponent,
|
||||
String skeletonsPath,
|
||||
@Nullable Ref<Boolean> migrationFlag,
|
||||
@NotNull Sdk sdk)
|
||||
throws InvalidSdkException {
|
||||
final Map<String, List<String>> errors = new TreeMap<String, List<String>>();
|
||||
@@ -133,7 +128,7 @@ public class PySkeletonRefresher {
|
||||
|
||||
changeGeneratingSkeletons(1);
|
||||
try {
|
||||
List<String> sdkErrors = refresher.regenerateSkeletons(checker, migrationFlag);
|
||||
List<String> sdkErrors = refresher.regenerateSkeletons(checker);
|
||||
if (sdkErrors.size() > 0) {
|
||||
String sdkName = sdk.getName();
|
||||
List<String> knownErrors = errors.get(sdkName);
|
||||
@@ -282,8 +277,7 @@ public class PySkeletonRefresher {
|
||||
return mySkeletonsPath;
|
||||
}
|
||||
|
||||
public List<String> regenerateSkeletons(@Nullable SkeletonVersionChecker cachedChecker,
|
||||
@Nullable Ref<Boolean> migrationFlag) throws InvalidSdkException {
|
||||
public List<String> regenerateSkeletons(@Nullable SkeletonVersionChecker cachedChecker) throws InvalidSdkException {
|
||||
final List<String> errorList = new SmartList<String>();
|
||||
final String homePath = mySdk.getHomePath();
|
||||
final String skeletonsPath = getSkeletonsPath();
|
||||
@@ -321,17 +315,6 @@ public class PySkeletonRefresher {
|
||||
final SkeletonHeader oldHeader = readSkeletonHeader(builtinsFile);
|
||||
final boolean oldOrNonExisting = oldHeader == null || oldHeader.getVersion() == 0;
|
||||
|
||||
if (migrationFlag != null && !migrationFlag.get() && oldOrNonExisting) {
|
||||
migrationFlag.set(true);
|
||||
Notifications.Bus.notify(
|
||||
new Notification(
|
||||
PythonSdkType.SKELETONS_TOPIC, PyBundle.message("sdk.gen.notify.converting.old.skels"),
|
||||
PyBundle.message("sdk.gen.notify.converting.text"),
|
||||
NotificationType.INFORMATION
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (myPregeneratedSkeletons != null && oldOrNonExisting) {
|
||||
indicate("Unpacking pregenerated skeletons...");
|
||||
try {
|
||||
|
||||
@@ -136,7 +136,7 @@ public final class PyTestSdkTools {
|
||||
|
||||
final SkeletonVersionChecker checker = new SkeletonVersionChecker(0);
|
||||
final PySkeletonRefresher refresher = new PySkeletonRefresher(project, null, sdk, skeletonsPath, null, null);
|
||||
final List<String> errors = refresher.regenerateSkeletons(checker, null);
|
||||
final List<String> errors = refresher.regenerateSkeletons(checker);
|
||||
Assert.assertThat("Errors found", errors, Matchers.empty());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user