public @NotNull List<String> regenerateSkeletons() throws InvalidSdkException, ExecutionException {
    final String skeletonsPath = getSkeletonsPath();
    final File skeletonsDir = new File(skeletonsPath);
    //noinspection ResultOfMethodCallIgnored
    skeletonsDir.mkdirs();

    mySkeletonsGenerator.prepare();

    myGeneratorVersion = readGeneratorVersion();

    final PyPregeneratedSkeletons preGeneratedSkeletons =
      PyPregeneratedSkeletonsProvider.findPregeneratedSkeletonsForSdk(mySdk, myGeneratorVersion);

    final String builtinsFileName = PySdkUtil.getBuiltinsFileName(mySdk);
    final File builtinsFile = new File(skeletonsPath, builtinsFileName);

    final PySkeletonHeader oldHeader = PySkeletonHeader.readSkeletonHeader(builtinsFile);
    final boolean oldOrNonExisting = oldHeader == null || oldHeader.getVersion() == 0;

    if (preGeneratedSkeletons != null && oldOrNonExisting) {
      indicate(PyBundle.message("sdk.gen.unpacking.prebuilt"));
      preGeneratedSkeletons.unpackPreGeneratedSkeletons(getSkeletonsPath());
    }

    indicate(PyBundle.message("sdk.gen.launching.generator"));
    final List<PySkeletonGenerator.GenerationResult> results = updateOrCreateSkeletons();
    final List<String> failedModules = ContainerUtil.mapNotNull(results, result -> {
      if (result.getGenerationStatus() == PySkeletonGenerator.GenerationStatus.FAILED) {
        return result.getModuleName();
      }
      return null;
    });
    final boolean builtinsUpdated = ContainerUtil.exists(results,
                                                         result -> result.getModuleOrigin().equals(PySkeletonHeader.BUILTIN_NAME));

    indicate(PyBundle.message("sdk.gen.reloading"));
    mySkeletonsGenerator.refreshGeneratedSkeletons();

    indicate(PyBundle.message("sdk.gen.cleaning.up"));
    cleanUpSkeletons(skeletonsDir);

    if ((builtinsUpdated || PythonSdkUtil.isRemote(mySdk)) && myProject != null) {
      ApplicationManager.getApplication().invokeLater(() -> DaemonCodeAnalyzer.getInstance(myProject).restart(), myProject.getDisposed());
    }

    return failedModules;
  }
public @NotNull List<String> regenerateSkeletons()