Files
zed/crates/remote_server/Cargo.toml
T
Pablo Fernandez 80e2242d3d Fix connecting to devcontainers, ssh, or wsl, with a locally built Zed (#63827)
# Objective

Video overview of this PR, maybe it helps with the review:
https://youtu.be/-JhKcZttXp8

Fixes: #63828

Building Zed from source and opening a project in a dev container fails
with `Remote server exited with status 1`.

Zed compiles `remote_server` and uploads it into the container. The
binary loads Zed's default settings from the Zed source directory, which
doesn't exist there, and panics in `settings::init`:

```
thread 'main' panicked at crates/util/src/util.rs:729:10:
dev asset loading requires running from within the checkout
```

The build passes `--features debug-embed` to embed those assets instead,
but `remote_server/debug-embed` only enabled its own (unused)
`rust-embed` dependency. It never reached `util/debug-embed`, which is
what `fs_embed!` gates on. Regression from #63396.

SSH and WSL remotes are affected the same way. Release builds are not:
assets are embedded whenever `debug_assertions` is off.

## Solution

Forward the feature.

```diff
-debug-embed = ["dep:rust-embed"]
+debug-embed = ["dep:rust-embed", "util/debug-embed"]
```

The same one-line change is already included as a secondary fix in
#63613, whose subject is unrelated; its author offered to split it out.

## Testing

- `cargo tree --package remote_server --features debug-embed` now
resolves `util` with `debug-embed`. Before:
`rand,test-support,util_macros`.
- `cargo check -p remote_server --features debug-embed --target
x86_64-unknown-linux-musl` passes clean.
- Manually: built Zed from source on Linux x86_64, opened a project in a
dev container (`mcr.microsoft.com/devcontainers/base:ubuntu`). Before:
panic at startup. After: connects.

Not tested on macOS or Windows hosts.

No test added: this is feature wiring, and #63577 notes that nothing in
Zed's graph enables `util/debug-embed`, so CI can't exercise it.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A
2026-09-08 09:49:17 +00:00

113 lines
3.2 KiB
TOML

[package]
name = "remote_server"
description = "Daemon used for remote editing"
edition.workspace = true
version = "0.1.0"
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/server.rs"
doctest = false
[[bin]]
name = "remote_server"
[features]
default = []
debug-embed = ["dep:rust-embed", "util/debug-embed"]
test-support = ["fs/test-support"]
[dependencies]
acp_thread.workspace = true
anyhow.workspace = true
async-channel.workspace = true
askpass.workspace = true
clap.workspace = true
client.workspace = true
collections.workspace = true
crashes.workspace = true
dap_adapters.workspace = true
debug_adapter_extension.workspace = true
env_logger.workspace = true
extension.workspace = true
extension_host.workspace = true
fs.workspace = true
futures.workspace = true
git.workspace = true
git_hosting_providers.workspace = true
gpui = { workspace = true, features = ["profiler"] }
gpui_platform.workspace = true
gpui_tokio.workspace = true
http_client.workspace = true
image.workspace = true
json_schema_store.workspace = true
language.workspace = true
language_extension.workspace = true
languages.workspace = true
log.workspace = true
lsp.workspace = true
net.workspace = true
node_runtime.workspace = true
paths.workspace = true
project.workspace = true
proto.workspace = true
release_channel.workspace = true
remote.workspace = true
reqwest_client.workspace = true
rpc.workspace = true
rust-embed = { workspace = true, optional = true, features = ["debug-embed"] }
semver.workspace = true
serde_json.workspace = true
settings.workspace = true
shellexpand.workspace = true
smol.workspace = true
sysinfo.workspace = true
task.workspace = true
telemetry.workspace = true
util.workspace = true
watch.workspace = true
worktree.workspace = true
thiserror.workspace = true
rayon.workspace = true
uuid = { workspace = true, features = ["v4"] }
[target.'cfg(windows)'.dependencies]
windows.workspace = true
gpui = { workspace = true, features = ["windows-manifest"] }
[dev-dependencies]
action_log.workspace = true
agent = { workspace = true, features = ["test-support"] }
agent-client-protocol.workspace = true
client = { workspace = true, features = ["test-support"] }
clock = { workspace = true, features = ["test-support"] }
editor = { workspace = true, features = ["test-support"] }
fs = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] }
language_model = { workspace = true, features = ["test-support"] }
lsp = { workspace = true, features = ["test-support"] }
node_runtime = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] }
remote = { workspace = true, features = ["test-support"] }
serde_json.workspace = true
tempfile.workspace = true
theme = { workspace = true, features = ["test-support"] }
theme_settings.workspace = true
unindent.workspace = true
workspace = { workspace = true, features = ["test-support"] }
zlog.workspace = true
[build-dependencies]
cargo_toml.workspace = true
toml.workspace = true
[package.metadata.cargo-shear]
ignored = ["rust-embed"]