Skip to content

Commit a93b4d2

Browse files
chore(deps-dev): bump @types/vscode from 1.108.1 to 1.109.0 in /vsix (#75)
* chore(deps-dev): bump @types/vscode from 1.108.1 to 1.109.0 in /vsix Bumps [@types/vscode](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/vscode) from 1.108.1 to 1.109.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/vscode) --- updated-dependencies: - dependency-name: "@types/vscode" dependency-version: 1.109.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * perf(ci): skip VS Code extensions and postCreateCommand in CI Strip customizations.vscode.extensions, postCreateCommand, and waitFor from devcontainer.json before running devcontainers/ci to speed up the Build Dev Container step. * perf: remove VS Code extensions from devcontainer.json - Remove extensions array from customizations.vscode (not needed) - Simplify CI strip step to only remove postCreateCommand and waitFor * refactor(ci): remove strip step, simplify devcontainer config * perf: remove unnecessary sudo chown from post-create.sh * perf(docker): remove unnecessary chown layer (saves 739MB) The base image already has /usr/local/cargo and /usr/local/rustup owned by vscode:rustlang. CI uses workspace-mounted CARGO_HOME, so this chown was creating a redundant 739MB layer. * perf(docker): switch to rust:1-bookworm base image (saves ~1.2GB) - Switch FROM mcr.microsoft.com/devcontainers/rust to rust:1-bookworm - Add common-utils feature to devcontainer.json to handle vscode user creation - Restore sudo chown in post-create.sh for local dev permissions * fix(ci): robust CI detection and vscode engine update - Update post-create.sh to check GITHUB_ACTIONS env var (fixes CI skipping) - Update engines.vscode to ^1.109.0 to match @types/vscode 1.109.0 (fixes local dev npm install) * fix(docker): install rustfmt and clippy components The official rust:1-bookworm image does not include these by default. * feat(docker): add ripgrep and vim Useful tools for development inside the container. * perf(docker): clean up apt cache Reduce image size by removing /var/lib/apt/lists/* after install. * refactor(docker): combine cargo-binstall installation and usage Reduces layers and clarifies dependency. * perf(docker): switch to rust:1-slim-bookworm Significantly reduce image size (~63% reduction) by using slim base image. * chore(docker): remove outdated comment * docs: add dev container performance requirement Specify that dev container images should be kept small. * docs: remove accidental line numbers --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: sonesuke <iamsonesuke@gmail.com>
1 parent 77990f6 commit a93b4d2

6 files changed

Lines changed: 36 additions & 41 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
1-
FROM mcr.microsoft.com/devcontainers/rust:1-bookworm
1+
FROM rust:1-slim-bookworm
22

33
# Install Node.js and other dependencies as root
44
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
55
&& apt-get -y install --no-install-recommends \
66
curl \
77
git \
88
pkg-config \
9-
libssl-dev
9+
libssl-dev \
10+
ripgrep \
11+
vim \
12+
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
1013

1114
# Install Node.js LTS manually
1215
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
13-
&& apt-get install -y nodejs
14-
15-
# Install vsce for VSIX packaging (global install needs root)
16-
RUN npm install -g @vscode/vsce
17-
18-
# Ensure vscode user has ownership of cargo and rustup directories before switching
19-
RUN chown -R vscode:vscode /usr/local/cargo /usr/local/rustup
20-
21-
# Switch to vscode user
22-
USER vscode
16+
&& apt-get install -y nodejs \
17+
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
2318

2419
# Ensure pre-installed tools are always in PATH even if CARGO_HOME is overridden at runtime
2520
ENV PATH=/usr/local/cargo/bin:$PATH
2621

27-
# No pre-build (cache is disabled by user request)
2822

29-
# Install cargo-binstall as vscode
30-
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
3123

32-
# Install cargo tools and components as vscode
33-
RUN rustup component add llvm-tools-preview \
24+
# Install cargo-binstall and other rust tools as root (installs to /usr/local/cargo/bin)
25+
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \
26+
&& rustup component add rustfmt clippy llvm-tools-preview \
3427
&& cargo binstall -y cargo-audit cargo-llvm-cov
3528

36-
# Install Claude CLI as vscode
29+
# Install Claude CLI as root
3730
RUN curl -fsSL https://claude.ai/install.sh | bash

.devcontainer/devcontainer.json

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,18 @@
44
"dockerfile": "Dockerfile",
55
"context": ".."
66
},
7-
"features": {},
8-
"remoteUser": "vscode",
9-
"containerUser": "vscode",
10-
"remoteEnv": {
11-
"Z_AI_API_KEY": "${localEnv:Z_AI_API_KEY}",
12-
"CI": "${localEnv:CI}"
7+
"features": {
8+
"ghcr.io/devcontainers/features/common-utils:2": {
9+
"installZsh": "true",
10+
"username": "vscode",
11+
"userUid": "1000",
12+
"userGid": "1000",
13+
"upgradePackages": "false"
14+
},
15+
"ghcr.io/devcontainers/features/git:1": {}
1316
},
1417
"customizations": {
15-
"vscode": {
16-
"extensions": [
17-
"rust-lang.rust-analyzer",
18-
"tamasfe.even-better-toml",
19-
"vadimcn.vscode-lldb",
20-
"dbaeumer.vscode-eslint"
21-
]
22-
}
18+
"vscode": {}
2319
},
2420
"postCreateCommand": "bash .devcontainer/post-create.sh",
2521
"waitFor": "postCreateCommand"

.devcontainer/post-create.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22
set -e
33

4-
# Fix permissions for CI environment where volume mounts may be root-owned
5-
sudo chown -R vscode:vscode /usr/local/cargo
4+
if [ -z "$CI" ] && [ -z "$GITHUB_ACTIONS" ]; then
5+
# Fix permissions for local development where CARGO_HOME is root-owned by the base image
6+
sudo chown -R vscode:vscode /usr/local/cargo
67

7-
if [ -z "$CI" ]; then
88
echo "Installing VSIX dependencies..."
99
npm install --prefix vsix
1010
(cd vsix && npx vsce package -o ../docgraph.vsix)

doc/architecture/design/development-norm.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ Defined in [.devcontainer/devcontainer.json](../../../.devcontainer/devcontainer
2222
- **Linting**: `cargo clippy` (Rust), `npm run lint` (VSIX).
2323
- **Security**: `cargo audit`.
2424

25+
### Performance
26+
27+
- **Image Size**: The Dev Container image should be kept as small as possible to ensure fast CI/CD execution and minimize local disk usage.
28+
- Use minimal base images (e.g., `slim` variants).
29+
- Remove unnecessary build artifacts and caches (e.g., `apt-get clean`).
30+
2531
---
2632

2733
<a id="CC_CONVENTIONAL_COMMITS"></a>

vsix/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vsix/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"license": "MIT",
1212
"engines": {
13-
"vscode": "^1.75.0"
13+
"vscode": "^1.109.0"
1414
},
1515
"categories": [
1616
"Programming Languages",
@@ -52,7 +52,7 @@
5252
"devDependencies": {
5353
"@biomejs/biome": "2.3.14",
5454
"@types/node": "25.x",
55-
"@types/vscode": "^1.75.0",
55+
"@types/vscode": "^1.109.0",
5656
"@vscode/vsce": "^3.7.1",
5757
"typescript": "^5.9.3"
5858
},

0 commit comments

Comments
 (0)