Skip to content

Commit c636784

Browse files
author
CI Bot
committed
fix(release): trim codelldb assets for publish
1 parent 8a01931 commit c636784

5 files changed

Lines changed: 36 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
### Improved
1818
- **Stepping UX** – every `step_*` response now embeds current source context so agents see the active file/line instead of generic “success” acknowledgements
1919

20+
### Packaging
21+
- **CodeLLDB footprint** – CLI bundle ships the Linux x64 CodeLLDB runtime by default (other platforms can point `CODELLDB_PATH` to an installed binary or re-run the vendor script) to stay within npm size limits
22+
2023
## [0.16.0] - 2025-11-09
2124

2225
### Added

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ COPY src ./src
5252
COPY scripts ./scripts/
5353

5454
# 4) Build workspace packages and main project (root build runs build:packages); then bundle
55-
RUN CODELLDB_VENDOR_LOCAL_ONLY=true CODELLDB_VENDOR_ALL=false CODELLDB_PLATFORMS=linux-x64 pnpm run build --silent
55+
# Download Linux CodeLLDB artifacts during the container build if they are not already vendored.
56+
RUN CODELLDB_VENDOR_ALL=false CODELLDB_PLATFORMS=linux-x64 pnpm run build --silent
5657
RUN node scripts/bundle.js
5758

5859
# Optional: quick diagnostics for bundle

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ mcp-debugger is a Model Context Protocol (MCP) server that provides debugging to
4040
- 🟨 **JavaScript (Node.js) debugging via js-debug** – VSCode's proven debugger (Alpha)
4141
- 🦀 **Rust debugging via CodeLLDB** – Debug Rust & Cargo projects (Alpha)
4242
> WARNING: On Windows, use the GNU toolchain for full variable inspection. Run `mcp-debugger check-rust-binary <path-to-exe>` to verify your build and see [Rust Debugging on Windows](docs/rust-debugging-windows.md) for detailed guidance.
43+
> NOTE: The published npm bundle ships the Linux x64 CodeLLDB runtime to stay under registry size limits. On macOS or Windows, point the `CODELLDB_PATH` environment variable at an existing CodeLLDB installation (for example from the VSCode extension) or clone the repo and run `pnpm --filter @debugmcp/adapter-rust run build:adapter` to vendor your platform binaries locally.
4344
4445
### Windows Rust Setup Script
4546

docs/rust-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ npm run build:adapter # Downloads and extracts CodeLLDB
1919

2020
## CodeLLDB Vendoring
2121

22-
The Rust adapter bundles the CodeLLDB binaries into `packages/adapter-rust/vendor/codelldb`. Vendoring runs automatically when you install or build the workspace:
22+
The Rust adapter bundles the CodeLLDB binaries into `packages/adapter-rust/vendor/codelldb`. Vendoring runs automatically when you install or build the workspace. To keep the published npm package within registry limits, the pre-built CLI ships only the Linux x64 CodeLLDB runtime. If you are on macOS or Windows, set the `CODELLDB_PATH` environment variable to your local CodeLLDB installation (for example from the VSCode extension) or run `pnpm --filter @debugmcp/adapter-rust run build:adapter` from a cloned repository to download your platform binaries.
2323

2424
- `pnpm install` (postinstall hook)
2525
- `pnpm vendor` or `pnpm vendor:adapters`

packages/mcp-debugger/scripts/bundle-cli.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,35 @@ async function bundleCLI() {
132132

133133
const rustVendorSrc = path.join(repoRoot, 'packages/adapter-rust/vendor/codelldb');
134134
if (fs.existsSync(rustVendorSrc)) {
135-
const rustVendorDest = path.join(distDir, 'vendor/codelldb');
136-
fs.cpSync(rustVendorSrc, rustVendorDest, { recursive: true });
137-
console.log('Copied CodeLLDB adapter payload.');
135+
const rawPlatforms = process.env.CODELLDB_PACKAGE_PLATFORMS ?? 'linux-x64';
136+
const requestedPlatforms = rawPlatforms
137+
.split(',')
138+
.map((platform) => platform.trim())
139+
.filter(Boolean);
140+
141+
if (requestedPlatforms.length === 0) {
142+
console.log('Skipping CodeLLDB inclusion (CODELLDB_PACKAGE_PLATFORMS empty).');
143+
} else {
144+
const rustVendorDest = path.join(distDir, 'vendor/codelldb');
145+
fs.mkdirSync(rustVendorDest, { recursive: true });
146+
147+
for (const platform of requestedPlatforms) {
148+
if (platform.toLowerCase() === 'none') {
149+
continue;
150+
}
151+
152+
const srcDir = path.join(rustVendorSrc, platform);
153+
if (!fs.existsSync(srcDir)) {
154+
console.warn(`[CodeLLDB bundler] Requested platform "${platform}" not found in vendor directory.`);
155+
console.warn('Run: pnpm -w -F @debugmcp/adapter-rust run build:adapter');
156+
continue;
157+
}
158+
159+
const destDir = path.join(rustVendorDest, platform);
160+
fs.cpSync(srcDir, destDir, { recursive: true });
161+
console.log(`Copied CodeLLDB payload for ${platform}.`);
162+
}
163+
}
138164
} else {
139165
console.warn('Warning: CodeLLDB vendor directory not found; Rust debugging may fail.');
140166
console.warn('Run: pnpm -w -F @debugmcp/adapter-rust run build:adapter');

0 commit comments

Comments
 (0)