|
| 1 | +- [[JetBrains/RustRover]] |
| 2 | + - Today I used a [[DevContainer]] in for the first time in Jetbrains ... |
| 3 | + - I saw a warning this morning when opening [[Langstar]] in Rust LRover: |
| 4 | + - ### Create Dev Container |
| 5 | + - Mounting sources on Windows and macOS can lead to performance degradation. We recommend using a clone of the sources inside the container. |
| 6 | + - `Cancel` ==Continue== |
| 7 | + - So, I need to use a devcontainer to standardize how my dev envirnoment marshals resources, but now I need to do that not just in a way that can be utilized in [[Codespaces]] as well as locally, but ALSO I need to somehow do that in such a way that filesystem syncing is turned off, implying that it's cloned ... |
| 8 | + - It seems like the way devcontainers are **meant** to work in [[VSCode]] is different than in [[JetBrains]]. In Jetbrains, they **want** you to **clone** the project into a container AFAICT. |
| 9 | + - | Feature | VS Code default | JetBrains Clone | |
| 10 | + | ---- | ---- | ---- | |
| 11 | + | Filesystem | Host-mounted | Container-native | |
| 12 | + | Performance | Medium–poor | Fast | |
| 13 | + | LSP / builds | Slower | Faster | |
| 14 | + | Git UX | Local Git | Container Git | |
| 15 | + | Warning dialog | Yes | No | |
| 16 | + | CI parity | Lower | Higher | |
| 17 | + - As a result, we need to do `File → Close Project`, then do `Remote Development → Dev Containers`, then enter in the path to `.devcontainer.json`, then it will build the image. |
| 18 | + - I ended up filing [Use named volume for /workspace in devcontainer to fix JetBrains file watching · Issue #711 · codekiln/langstar](https://github.com/codekiln/langstar/issues/711) for this. |
| 19 | + - BTW w.r.t. [[Mermaid Diagrams]] ... |
| 20 | + - I used to use Mermaid diagrams exclusively for sharing representations of architecture with LLMs. Lately, I've noticed that they can just as well generate, and crucially, understand ascii art diagrams as well, which don't require a mermaidjs runtime to render for humans. |
| 21 | + - ``` |
| 22 | + ┌─────────────────────────────────────────────────────────────────┐ |
| 23 | + │ HOST MACHINE │ |
| 24 | + │ ┌─────────────────────────────────────────────────────────┐ │ |
| 25 | + │ │ .devcontainer/ │ │ |
| 26 | + │ │ ├── .env ← Your secrets (gitignored) │ │ |
| 27 | + │ │ ├── docker-compose.yml ← Reads .env for substitution │ │ |
| 28 | + │ │ └── devcontainer.json │ │ |
| 29 | + │ └─────────────────────────────────────────────────────────┘ │ |
| 30 | + │ │ │ |
| 31 | + │ Docker Compose │ |
| 32 | + │ substitutes ${VARS} │ |
| 33 | + │ │ │ |
| 34 | + │ ▼ │ |
| 35 | + │ ┌─────────────────────────────────────────────────────────┐ │ |
| 36 | + │ │ CONTAINER │ │ |
| 37 | + │ │ Environment variables set via docker-compose.yml │ │ |
| 38 | + │ │ ├── GITHUB_PAT=<from .env> │ │ |
| 39 | + │ │ ├── AWS_ACCESS_KEY_ID=<from .env> │ │ |
| 40 | + │ │ └── LANGSMITH_API_KEY=<from .env> │ │ |
| 41 | + │ │ │ │ |
| 42 | + │ │ /workspace ← Named Docker volume (code lives here) │ │ |
| 43 | + │ └─────────────────────────────────────────────────────────┘ │ |
| 44 | + └─────────────────────────────────────────────────────────────────┘ |
| 45 | + ``` |
| 46 | + - For example, in this diagram, if you paste it into chatgpt, it will know exactly what's going on. |
| 47 | + - [[POSIX]] issues |
| 48 | + - using [[Claude Code]] in a terminal ends up not receiving the `ESC` key for some reason using the new terminal in [[JetBrains]]. |
| 49 | + - In terminals, **`Ctrl-[` is literally the ASCII Escape character**. |
| 50 | + - Use: |
| 51 | + - ``` |
| 52 | + Ctrl + [ |
| 53 | + ``` |
| 54 | + - instead of: |
| 55 | + - ``` |
| 56 | + Esc |
| 57 | + ``` |
| 58 | + - Claude Code will treat it exactly the same. |
| 59 | + - |
0 commit comments