You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1aef8bd
Browse filesBrowse the repository at this point in the historyBrowse files
chore(showcase): take a Kotlin hover shot and Settings with Kotlin ready, for cstudy 0.31
The seed stage starts majority-element in Kotlin, and the Kotlin shot hovers groupingBy until its KDoc shows. Settings waits for the kotlin-lsp line. --accept-license passes a server's license to cstudy doctor --fix in the prepare stage, which accepts it in the throwaway workspace only, so its Gradle daemons run under the script's watch; prepare prints what doctor --fix printed.
A run takes several minutes and runs one Chromium, `cstudy serve` and the language servers it starts, so close other heavy work first.
28
28
29
+
Kotlin's server, JetBrains' Kotlin LSP, comes under the JetBrains Free Plugin License Agreement, and `cstudy doctor --fix` downloads it only once that licence is accepted. Read it, then add `--accept-license kotlin-lsp` to the run: the prepare stage passes it to `cstudy doctor --fix`, which records the acceptance in the throwaway workspace only. Without it, the Kotlin hover and the settings shot wait for a server that never comes. The prepare stage prints what `cstudy doctor --fix` printed.
30
+
29
31
`--stages` runs part of it, in this order: `prepare` (virtual environment, `cstudy init --no-ide`, preferences, `cstudy doctor --fix`), `seed` (practice history), `videos`, `shots`, `mock`. A later stage needs the earlier ones, so rerun a single stage only against the same `--work` folder, and without `prepare`, which wants the folder empty. Run `videos` before `shots`, and `mock` last: a mock in progress adds a banner to every view.
30
32
31
33
`--shots` takes some of the screenshots of the `shots` stage, by name, such as `--shots web-ui-attempt,web-ui-settings`; a shot left out does not open its view, so leaving out `web-ui-health` starts no Gradle. `--variants` takes the screenshots in some themes and widths only, such as `--variants light-phone`: on a machine short of memory, one variant per run starts one Chromium and one Java language server at a time, and frees them in between. `--video-theme dark` records the animations in the dark theme.
32
34
33
-
When it ends, stop what it may have left: `ps -Ao pid,ppid,etime,command | rg -i "basedpyright|typescript-language-server|jdtls|gopls|rust-analyzer|uvicorn|cstudy serve|ms-playwright|GradleDaemon|KotlinCompileDaemon"`. The script stops the server and the browser, and the Gradle and Kotlin daemons that its own processes started (`cstudy doctor --fix`, the Health view and JDT LS start them): it looks at the processes below it every half second while it runs, notes the daemons it finds there, and stops those by PID at the end. A daemon that was running before, or that other work on this machine starts meanwhile, is never below the script, so it stays.
35
+
When it ends, stop what it may have left: `ps -Ao pid,ppid,etime,command | rg -i "basedpyright|typescript-language-server|jdtls|kotlin-lsp|gopls|rust-analyzer|uvicorn|cstudy serve|ms-playwright|GradleDaemon|KotlinCompileDaemon"`. The script stops the server and the browser, and the Gradle and Kotlin daemons that its own processes started (`cstudy doctor --fix`, the Health view, JDT LS and the Kotlin LSP start them): it looks at the processes below it every half second while it runs, notes the daemons it finds there, and stops those by PID at the end. A daemon that was running before, or that other work on this machine starts meanwhile, is never below the script, so it stays.
34
36
35
37
## What it makes
36
38
@@ -42,6 +44,7 @@ Desktop images are 1440 by 900, the phone ones 390 wide at 2x. A name is `<name>
42
44
|`code-intelligence-error`| An undefined name underlined, with its message |
43
45
|`autocomplete-list`| The completion list with its documentation panel |
44
46
|`code-intelligence-java-hover`| The Javadoc tooltip on `getOrDefault` in top-k-frequent-elements (Java), from Eclipse JDT LS; the seed stage starts that attempt |
47
+
|`code-intelligence-kotlin-hover`| The KDoc of `groupingBy` in majority-element (Kotlin), from JetBrains' Kotlin LSP and the standard library's sources in Gradle's cache; the seed stage starts that attempt |
45
48
|`code-intelligence-go-hover`| The documentation of `strings.Split` in group-anagrams (Go), from gopls, with its links to `SplitN` and `Cut`; the seed stage starts that attempt |
46
49
|`code-intelligence-rust-hover`| The documentation of `Vec` in product-except-self (Rust), from rust-analyzer and the toolchain's standard library; the seed stage starts that attempt |
47
50
|`web-ui-problems`| The problem list |
@@ -70,5 +73,6 @@ Recording uses Playwright's `record_video_dir` with a small injected pointer, si
70
73
- The script writes files only into `--work` and `--out`. Nothing it makes is committed for you.
71
74
- It needs the language servers, so it runs `cstudy doctor --fix` with the network. After that it works offline.
72
75
- A new language server needs a new feature shot, as Java's has, and a scene in `code_intelligence_scene` if the animation should show it. The health shot picks up new rows by itself; the settings shot also waits for each server's line, so a JDK outside 25 and 26 stops it instead of showing Java's `needs JDK 25 or 26`.
73
-
- JDT LS says ready before its first Gradle import ends, so the Java shot hovers again until the Javadoc shows, for up to three minutes. The Go and Rust shots hover the same way. Each of the three waits for its server to stop before the next shot, so that two never run at once.
76
+
- JDT LS says ready before its first Gradle import ends, so the Java shot hovers again until the Javadoc shows, for up to three minutes. The Kotlin LSP also imports the Gradle build first, so the Kotlin shot waits up to three minutes for ready and hovers again for up to five. The Go and Rust shots hover the same way. Each of the four waits for its server to stop before the next shot, so that two never run at once.
77
+
- The Kotlin LSP imports Gradle with the selected JDK, 21 to 26, so the JDK 25 or 26 that Java needs serves both. JetBrains' builds stop about a month after release: the settings shot shows the build's last day, and an expired build needs a new `prepare`.
74
78
- The Go and Rust shots need gopls, which `cstudy doctor --fix` builds with the selected Go, and rust-analyzer on `PATH` (`rustup component add rust-analyzer`), which the script never installs. The settings shot waits for both lines.
0 commit comments