backport: 20.0.3

This commit is contained in:
FalsePattern 2024-11-28 11:17:18 +01:00
parent 90744797b6
commit e63ad21db7
Signed by: falsepattern
GPG key ID: E930CDEC50C50E23
7 changed files with 26 additions and 23 deletions

View file

@ -17,6 +17,13 @@ Changelog structure reference:
## [Unreleased]
## [20.0.3]
### Fixed
- Project
- "Save all documents" hanging when trying to run a zig file
## [20.0.2]
### Added

View file

@ -23,7 +23,10 @@ val javaVersion = property("javaVersion").toString().toInt()
val lsp4ijVersion: String by project
val runIdeTarget: String by project
val lsp4ijNightly = property("lsp4ijNightly").toString().toBoolean()
val useInstaller = property("useInstaller").toString().toBoolean()
val lsp4ijPluginString = "com.redhat.devtools.lsp4ij:$lsp4ijVersion${if (lsp4ijNightly) "@nightly" else ""}"
val ideaCommunityVersion: String by project
val clionVersion: String by project
group = "com.falsepattern"
version = pluginVersionFull
@ -100,8 +103,8 @@ allprojects {
dependencies {
intellijPlatform {
when(runIdeTarget) {
"ideaCommunity" -> create(IntelliJPlatformType.IntellijIdeaCommunity, providers.gradleProperty("ideaCommunityVersion"))
"clion" -> create(IntelliJPlatformType.CLion, providers.gradleProperty("clionVersion"))
"ideaCommunity" -> create(IntelliJPlatformType.IntellijIdeaCommunity, ideaCommunityVersion, useInstaller = useInstaller)
"clion" -> create(IntelliJPlatformType.CLion, clionVersion, useInstaller = useInstaller)
}
pluginVerifier()
@ -109,8 +112,8 @@ dependencies {
plugin(lsp4ijPluginString)
}
implementation(project(":core"))
implementation(project(":cidr"))
runtimeOnly(project(":core"))
runtimeOnly(project(":cidr"))
}
intellijPlatform {
@ -131,7 +134,7 @@ intellijPlatform {
val changelog = project.changelog
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
changeNotes = provider { pluginVersion }.map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())

View file

@ -7,6 +7,7 @@ plugins {
}
val lsp4jVersion: String by project
val clionVersion: String by project
val useInstaller = property("useInstaller").toString().toBoolean()
val genOutputDir = layout.buildDirectory.dir("generated-resources")
sourceSets["main"].resources.srcDir(genOutputDir)
@ -23,7 +24,7 @@ tasks {
dependencies {
intellijPlatform {
create(IntelliJPlatformType.CLion, providers.gradleProperty("clionVersion"))
create(IntelliJPlatformType.CLion, clionVersion, useInstaller = useInstaller)
bundledPlugins("com.intellij.clion", "com.intellij.cidr.base", "com.intellij.nativeDebug")
}
implementation(project(":core"))

View file

@ -1,13 +1,7 @@
dialog.title.download.debugger=Download Debugger
notification.nativedebug.title=Zig native debugger
notification.nativedebug.text=You need to install the "Native Debugging Support" plugin for Zig debugging in this IDE!
notification.nativedebug.market=Install from Marketplace
notification.nativedebug.browser=Open in Browser
notification.title.debugger=Debugger
notification.content.debugger.successfully.downloaded=Debugger successfully downloaded
notification.content.debugger.downloading.failed=Debugger downloading failed
notification.content.debugger.metadata.downloading.failed=Debugger metadata downloading failed, switching to fallback
notification.content.debugger.metadata.fallback.fetch.failed=Debugger fallback metadata fetch failed
notification.content.debugger.metadata.fallback.parse.failed=Debugger fallback metadata parse failed
settings.debugger.toolchain.download.debugger.automatically.checkbox=Download and update the debugger automatically
settings.debugger.title=Zig
@ -15,7 +9,6 @@ settings.debugger.toolchain.debugger.label=Debugger:
settings.debugger.toolchain.download.comment=Need to be <a>downloaded</a>
settings.debugger.toolchain.update.comment=Need to be <a>updated</a>
settings.debugger.toolchain.use.clion.toolchains=Use Clion toolchains instead
notification.content.debugger.need.download=You need to download/update the debugger before you can run debugging! (Settings | Build, Execution, Deployment | Debugging -> Zig)
debugger.run.unavailable=Unable to Run Debugger
debugger.run.unavailable.reason.download=Debugger is not downloaded yet
debugger.run.unavailable.reason.download.button=Download

View file

@ -9,10 +9,12 @@ plugins {
val lsp4ijVersion: String by project
val lsp4jVersion: String by project
val ideaCommunityVersion: String by project
val useInstaller = property("useInstaller").toString().toBoolean()
dependencies {
intellijPlatform {
create(IntelliJPlatformType.IntellijIdeaCommunity, providers.gradleProperty("ideaCommunityVersion"))
create(IntelliJPlatformType.IntellijIdeaCommunity, ideaCommunityVersion, useInstaller = useInstaller)
}
compileOnly("com.redhat.devtools.intellij:lsp4ij:$lsp4ijVersion")
compileOnly("org.eclipse.lsp4j:org.eclipse.lsp4j:$lsp4jVersion")

View file

@ -45,9 +45,10 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.async
import org.jetbrains.concurrency.Promise
abstract class ZigProgramRunner<ProfileState: ZigProfileState<*>>(protected val executorId: String): AsyncProgramRunner<RunnerSettings>() {
abstract class ZigProgramRunner<ProfileState : ZigProfileState<*>>(protected val executorId: String) : AsyncProgramRunner<RunnerSettings>() {
@OptIn(ExperimentalCoroutinesApi::class)
override fun execute(environment: ExecutionEnvironment, state: RunProfileState): Promise<RunContentDescriptor?> {
FileDocumentManager.getInstance().saveAllDocuments()
return environment.project.zigCoroutineScope.async {
withModalProgress(ModalTaskOwner.project(environment.project), "Starting zig program...", TaskCancellation.cancellable()) {
executeAsync(environment, state)
@ -71,13 +72,8 @@ abstract class ZigProgramRunner<ProfileState: ZigProfileState<*>>(protected val
}
return reportProgress { reporter ->
reporter.indeterminateStep("Saving all documents") {
withEDTContext {
FileDocumentManager.getInstance().saveAllDocuments()
}
}
return@reportProgress reporter.indeterminateStep {
return@indeterminateStep execute(state, toolchain, environment)
reporter.indeterminateStep {
execute(state, toolchain, environment)
}
}

View file

@ -1,13 +1,14 @@
pluginName=ZigBrains
pluginRepositoryUrl=https://github.com/FalsePattern/ZigBrains
pluginVersion=20.0.2
pluginVersion=20.0.3
pluginSinceBuild=241
pluginUntilBuild=241.*
ideaCommunityVersion=2024.1.7
clionVersion=2024.1.6
useInstaller=true
javaVersion=17
# ideaCommunity / clion
runIdeTarget=clion