From 54454abe32542999f1b894e66e90c17a203fc907 Mon Sep 17 00:00:00 2001 From: Marcus Lagergren <1062473+lagergren@users.noreply.github.com> Date: Mon, 16 Nov 2026 20:49:38 +0100 Subject: [PATCH] Turn the IntelliJ plugin's searchable options off with the platform plugin's own switch The build turned searchable options off by disabling the buildSearchableOptions task. Since IntelliJ Platform Gradle Plugin 2.20.0 (master has 2.20.1 since #770), prepareJarSearchableOptions reads a directory under build/ that only buildSearchableOptions creates; before, it read that task's temporaryDir, which Gradle creates when it is asked for. With the task disabled, every build of the plugin failed: A problem was found with the configuration of task ':lang:intellij-plugin:prepareJarSearchableOptions' (type 'PrepareJarSearchableOptionsTask'). Input file does not exist: property 'inputDirectory' specifies directory '.../lang/intellij-plugin/build/tmp/buildSearchableOptions' which doesn't exist Master's CI builds without the lang build (includeBuildLang=false), so it did not see this. intellijPlatform.buildSearchableOptions, set from the same -Plsp.buildSearchableOptions property, makes the platform plugin skip buildSearchableOptions, prepareJarSearchableOptions and jarSearchableOptions together. The property's declaration moves above the intellijPlatform block that now reads it. Validated: :lang:intellij-plugin:buildPlugin with those three tasks SKIPPED, and :lang:intellij-plugin:test, 261 tests, 0 failures, 0 skipped. --- lang/intellij-plugin/build.gradle.kts | 28 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/lang/intellij-plugin/build.gradle.kts b/lang/intellij-plugin/build.gradle.kts index 5c61b74fc9..db70eba60b 100644 --- a/lang/intellij-plugin/build.gradle.kts +++ b/lang/intellij-plugin/build.gradle.kts @@ -387,6 +387,17 @@ val intellijSinceBuild: String = // the run, while transform output would land in the Gradle user home that CI caches. val extractIdesIntoCheckout = providers.environmentVariable("CI").isPresent +// Searchable options allow IntelliJ's Settings search (Cmd+Shift+A / Ctrl+Shift+A) to index +// this plugin's settings pages and configuration UI text. When disabled, users cannot find +// plugin settings via the search bar — they must navigate to them manually. Enabling it adds +// ~30-60s to the build because it launches a headless IDE to index all settings pages. +// Enable with: -Plsp.buildSearchableOptions=true +val buildSearchableOptionsEnabled = xdkProperties.booleanValue("lsp.buildSearchableOptions", false) + +val searchableOptionsStatus = + if (buildSearchableOptionsEnabled) "enabled" else "disabled (use -Plsp.buildSearchableOptions=true to enable)" +logger.info("[ide] Searchable options: $searchableOptionsStatus") + intellijPlatform { caching { ides { @@ -403,6 +414,12 @@ intellijPlatform { // deprecated in Gradle 9.9 and removed in Gradle 10, and printed that deprecation on every build. instrumentCode = false + // Off unless -Plsp.buildSearchableOptions=true. The platform plugin's own switch also skips + // prepareJarSearchableOptions and jarSearchableOptions: since IntelliJ Platform Gradle Plugin + // 2.20.0, disabling only the buildSearchableOptions task leaves prepareJarSearchableOptions + // with an input directory that nothing creates, and the build fails. + buildSearchableOptions = buildSearchableOptionsEnabled + pluginConfiguration { id = "org.xtclang.idea" // The language is officially "Ecstasy"; "XTC" is the file extension @@ -505,17 +522,6 @@ val publishPlugin = dependsOn(verifyPlugin) } -// Searchable options allow IntelliJ's Settings search (Cmd+Shift+A / Ctrl+Shift+A) to index -// this plugin's settings pages and configuration UI text. When disabled, users cannot find -// plugin settings via the search bar — they must navigate to them manually. Enabling it adds -// ~30-60s to the build because it launches a headless IDE to index all settings pages. -// Enable with: -Plsp.buildSearchableOptions=true -val buildSearchableOptionsEnabled = xdkProperties.booleanValue("lsp.buildSearchableOptions", false) - -val searchableOptionsStatus = - if (buildSearchableOptionsEnabled) "enabled" else "disabled (use -Plsp.buildSearchableOptions=true to enable)" -logger.info("[ide] Searchable options: $searchableOptionsStatus") - val buildSearchableOptions = tasks.named("buildSearchableOptions") { enabled = buildSearchableOptionsEnabled