From 264d2c80cc440a025603caa7a464c6c25263ce8a Mon Sep 17 00:00:00 2001 From: m0rkeulv Date: Sun, 1 Dec 2024 13:29:56 +0100 Subject: [PATCH] Fix auto-project-reload looping bug (#1197) --- CHANGELOG.md | 3 +++ gradle.properties | 4 ++-- .../projectStructure/autoimport/HaxelibAutoImport.java | 9 ++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12c655ee6..cb0305c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## 1.5.12 +* Bugfix: Fixed issue where Auto-reload project on changes could end up in an infinite loop. (#1197) + ## 1.5.12 * Changed: support for intellij 2024.3 & dropping support for 2023.x * Bugfix: Errors where not navigable when OpenFL project file was outside module dir (Fixed by fstrace4) diff --git a/gradle.properties b/gradle.properties index d78cecff9..0f932a3e4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ pluginName = Haxe Toolkit Support pluginRepositoryUrl = https://github.com/HaxeFoundation/intellij-haxe # SemVer format -> https://semver.org -pluginVersion = 1.5.12 +pluginVersion = 1.5.13 # IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties platformType = IU @@ -23,7 +23,7 @@ platformDownloadSources = true # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. -pluginSinceBuild = 241 +pluginSinceBuild = 242 pluginUntilBuild = 243.* # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html diff --git a/src/main/java/com/intellij/plugins/haxe/ide/projectStructure/autoimport/HaxelibAutoImport.java b/src/main/java/com/intellij/plugins/haxe/ide/projectStructure/autoimport/HaxelibAutoImport.java index 083fde2c4..d02b86ddf 100644 --- a/src/main/java/com/intellij/plugins/haxe/ide/projectStructure/autoimport/HaxelibAutoImport.java +++ b/src/main/java/com/intellij/plugins/haxe/ide/projectStructure/autoimport/HaxelibAutoImport.java @@ -57,9 +57,12 @@ private String getBuildConfigFile(HaxeModuleSettings settings) { @Override public boolean isIgnoredSettingsFileEvent(@NotNull String path, @NotNull ExternalSystemSettingsFilesModificationContext context) { - Set files = getSettingsFiles(); - if(files.contains(path)){ - return false; + // TODO: this "if" is just an attempt to prevent Project reload from marking settings files as changed when reloaded + if(context.getReloadStatus() == ExternalSystemSettingsFilesModificationContext.ReloadStatus.IDLE) { + Set files = getSettingsFiles(); + if (files.contains(path)) { + return false; + } } return true; }