Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/codeql-kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ jobs:
distribution: temurin
java-version: "21"

- name: Free disk space for CodeQL
shell: bash
run: |
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/boost
docker system prune --all --force || true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion packages/kilo-jetbrains/.run/Run IDE (Backend).run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run IDE (Backend)" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="Backend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-backend/kilo-dev.log" show_all="true" />
<log_file alias="Backend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-backend/kilo-dev.log.0" show_all="true" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/packages/kilo-jetbrains" />
Expand Down
2 changes: 1 addition & 1 deletion packages/kilo-jetbrains/.run/Run IDE (Frontend).run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run IDE (Frontend)" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="Frontend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-frontend/kilo-dev.log" show_all="true" />
<log_file alias="Frontend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-frontend/kilo-dev.log.0" show_all="true" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/packages/kilo-jetbrains" />
Expand Down
4 changes: 2 additions & 2 deletions packages/kilo-jetbrains/.run/runIdeSplitMode.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run IDE (Split Mode)" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="Backend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-backend/kilo-dev.log" show_all="true" />
<log_file alias="Frontend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-frontend/kilo-dev.log" show_all="true" />
<log_file alias="Backend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-backend/kilo-dev.log.0" show_all="true" />
<log_file alias="Frontend Kilo" path="$PROJECT_DIR$/packages/kilo-jetbrains/.intellijPlatform/sandbox/kilo.jetbrains/kilo-frontend/kilo-dev.log.0" show_all="true" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/packages/kilo-jetbrains" />
Expand Down
6 changes: 6 additions & 0 deletions packages/kilo-jetbrains/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased]

### Fixed

- Surface a clear error when the Kilo backend fails to start instead of hanging on loading, write rotated `kilo-dev.log.*` diagnostic logs in release builds, and add CLI install path diagnostics for relocated JetBrains system folders.

## 7.4.2

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/kilo-jetbrains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ All properties below are passed with `-P` on the Gradle command line or in the r
| `kilo.dev.worktree.root` | monorepo root | Worktree root used to resolve `.kilo-dev/`. Auto-detected from the Gradle project directory; override only when the auto-detection is wrong. |

The checked-in IDE run configurations pass `--no-configuration-cache` because the IntelliJ Platform Gradle Plugin run-IDE tasks are not configuration-cache compatible in this setup.
They also pass `--purge-old-log-directories` so stale sandbox logs do not hide the current backend and frontend `kilo-dev.log` files.
They also pass `--purge-old-log-directories` so stale sandbox logs do not hide the current backend and frontend `kilo-dev.log.*` files.

Example with a fixed split-mode port:

Expand Down Expand Up @@ -141,7 +141,7 @@ The checked-in `Run IDE (Backend)`, `Run IDE (Frontend)`, and `Run IDE (Split Mo

### Debug logging properties

The plugin supports a few JVM system properties for local debugging. These are most useful with sandbox runs because the logs are mirrored to `kilo-dev.log` files for frontend and backend.
The plugin supports a few JVM system properties for local debugging. These are most useful with sandbox runs because the logs are mirrored to `kilo-dev.log.*` files for frontend and backend.

`kilo.dev.log.level`

Expand All @@ -167,8 +167,8 @@ The plugin supports a few JVM system properties for local debugging. These are m
Where to find the log files:

- In sandbox runs, Kilo writes separate dev log files for each side under the IDE sandbox log directory reported by `PathManager.getLogDir()`.
- Frontend log file: `<sandbox log dir>/kilo-frontend/kilo-dev.log`
- Backend log file: `<sandbox log dir>/kilo-backend/kilo-dev.log`
- Frontend log file: `<sandbox log dir>/kilo-frontend/kilo-dev.log.0`
- Backend log file: `<sandbox log dir>/kilo-backend/kilo-dev.log.0`
- In practice these sit under the current `log_run*` sandbox logs for the active run.
- If you are unsure of the exact sandbox root, open the IDE log directory from the running sandbox instance and then look for the `kilo-frontend/` and `kilo-backend/` subdirectories.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,36 @@ class KiloBackendAppService private constructor(
}

suspend fun restart() {
log.info("restart: requested — waiting for lifecycle mutex")
mutex.withLock {
clear()
connection.restart()
log.info("restart: acquired lifecycle mutex")
try {
clear()
connection.restart()
log.info("restart: complete")
} catch (e: CancellationException) {
throw e
} catch (e: Exception) {
Comment thread
kirillk marked this conversation as resolved.
log.warn("restart: failed", e)
throw e
}
}
}

suspend fun reinstall() {
log.info("reinstall: requested — waiting for lifecycle mutex")
mutex.withLock {
clear()
connection.reinstall()
log.info("reinstall: acquired lifecycle mutex")
try {
clear()
connection.reinstall()
log.info("reinstall: complete")
} catch (e: CancellationException) {
throw e
} catch (e: Exception) {
log.warn("reinstall: failed", e)
throw e
}
}
}

Expand Down
Loading
Loading