Skip to content

Commit

Permalink
Update IntelliJ versions: eapOfLatestSupportedMajor to 233.10527.20-E…
Browse files Browse the repository at this point in the history
…AP-SNAPSHOT, latestStable to 2023.2.4 (#1750)

* Update IntelliJ versions: eapOfLatestSupportedMajor to 233.10527.20-EAP-SNAPSHOT

* Tidy up TODO comments

---------

Co-authored-by: Pawel Lipski <[email protected]>
  • Loading branch information
git-machete-bot and PawelLipski authored Oct 26, 2023
1 parent ae8d755 commit bbc90dc
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ jobs:
tr '\n' ',' |
sed 's/,$//' |
sed 's/,/, /g'
labels: intellij-support
labels: "intellij range"

- run:
# These updates don't seem to be supported by dependabot as of August 2023,
Expand All @@ -276,8 +276,6 @@ jobs:
# language=sh
command: |
latest_gradle_version=$(curl -fsSL https://services.gradle.org/versions/current | jq -r .version)
# TODO (#1744): bump Gradle wrapper (8.4 fails the configuration phase)
if [[ $latest_gradle_version == 8.4 ]]; then exit 0; fi
./gradlew wrapper --gradle-version=$latest_gradle_version # this only updates gradle-wrapper.properties
./gradlew dependencies # to actually pull the new wrapper script/jar
echo "$latest_gradle_version" > /tmp/gradle-version
Expand Down
2 changes: 1 addition & 1 deletion CHANGE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog

## v4.1.0
- Added support for IntelliJ 2023.3.
- Added: support for IntelliJ 2023.3.

## v4.0.3
- Fixed: all `com.intellij.diagnostic.PluginException: ... ms to call on EDT ...#update@...` errors, hopefully for good (reported by @itxshakil)
Expand Down
1 change: 0 additions & 1 deletion buildSrc/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ junit-api = "org.junit.jupiter:junit-jupiter-api:5.10.0"
pluginPackages-checkerFramework = "org.checkerframework:checkerframework-gradle-plugin:0.6.30"
pluginPackages-grgit = "org.ajoberstar.grgit:grgit-gradle:5.2.1"
pluginPackages-jetbrains-changelog = "org.jetbrains.intellij.plugins:gradle-changelog-plugin:2.1.2"
# TODO (#1743): bump gradle-intellij-plugin (1.16.0 failing at backend:impl:test)
pluginPackages-jetbrains-intellij = "org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.16.0"
pluginPackages-jetbrains-kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
pluginPackages-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.22.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
import static git4idea.ui.branch.GitBranchPopupActions.RemoteBranchActions.CheckoutRemoteBranchAction.checkoutRemoteBranch;
import static org.apache.commons.text.StringEscapeUtils.escapeHtml4;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collections;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.vcs.VcsNotifier;
import git4idea.GitRemoteBranch;
import git4idea.branch.GitNewBranchOptions;
import git4idea.repo.GitRepository;
import git4idea.ui.branch.GitBranchCheckoutOperation;
import io.vavr.Tuple;
Expand Down Expand Up @@ -189,9 +192,29 @@ public void actionPerformed(AnActionEvent anActionEvent) {

if (remoteBranch == null) {
return Tuple.of(branchName, () -> {
//noinspection KotlinInternalInJava
val gitBranchCheckoutOperation = new GitBranchCheckoutOperation(project, Collections.singletonList(gitRepository));
gitBranchCheckoutOperation.perform(startPoint, options.toGit4IdeaOptions());
val git4IdeaOptions = options.toGit4IdeaOptions();
try {
// Since 233.10527.20-EAP-SNAPSHOT
Method perform = GitBranchCheckoutOperation.class.getDeclaredMethod("perform", String.class,
GitNewBranchOptions.class, Runnable.class);
try {
// TODO (#1755): replace with a non-reflective call once 2023.2 is no longer supported
@SuppressWarnings("nullness:argument") val ignore = perform.invoke(gitBranchCheckoutOperation, startPoint,
git4IdeaOptions, /* callInAwtLater */ null);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
} catch (NoSuchMethodException e) {
// Before 233.10527.20-EAP-SNAPSHOT
try {
Method perform = GitBranchCheckoutOperation.class.getDeclaredMethod("perform", String.class,
GitNewBranchOptions.class);
perform.invoke(gitBranchCheckoutOperation, startPoint, git4IdeaOptions);
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e1) {
throw new RuntimeException(e1);
}
}
});

} else if (options.shouldCheckout()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private void trackCurrentBranchChange(GitRepository repository) {
// (not all snapshots of all repositories!).
// 2. The unmanaged branch notification works on the same snapshot as the one selected in Git Machete panel.
// Hence, we must assure that the current branch changed belongs to the same repository as the given snapshot.
// TODO (#1542): A handling of all repositories (not only selected) is a subject to of improvement.
// TODO (#1542): Handling of all repositories (not only selected) is a subject to improvement.
if (snapshot != null && snapshot.getMainGitDirectoryPath().equals(mainGitDirectory)) {
val entry = snapshot.getBranchLayout().getEntryByName(repositoryCurrentBranchName);
if (entry == null) {
Expand Down
4 changes: 2 additions & 2 deletions intellij-versions.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
eapOfLatestSupportedMajor=233.9802.14-EAP-SNAPSHOT
eapOfLatestSupportedMajor=233.10527.20-EAP-SNAPSHOT
earliestSupportedMajor=2022.2
latestMinorsOfOldSupportedMajors=2022.2.5,2022.3.3,2023.1.5
latestStable=2023.2.3
latestStable=2023.2.4

0 comments on commit bbc90dc

Please sign in to comment.