mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-27 08:34:11 +00:00
Closes #49055 **Heads up**: This might be a naïve solution. I ran into the issue after merging latest main into https://github.com/zed-industries/zed/pull/48896, and confirming that it was unrelated to that PR and incoming from upstream. Agent one-shot the fix, it works and tests pass. But I'm still wrapping my head around the changes that led to the bug. I figured the breakage is bad enough (I couldn't open devcontainers at all) to submit a possibly naïve fix. ## Fix Hoists the `find_devcontainer_configs` call out of `new_dev_container` and into the call site, where we already have a direct `&mut Workspace` reference that doesn't go through the entity map. The computed configs are passed into `new_dev_container` as an argument. ## What was happening After #48800 ("Re-add MultiWorkspace"), `with_active_or_new_workspace` nests a `Workspace` entity lease inside a `MultiWorkspace` entity lease. The `OpenDevContainer` handler was also changed from async to sync in the same PR, so `RemoteServerProjects::new_dev_container` now runs while `Workspace` is leased. Inside `new_dev_container`, a `WeakEntity<Workspace>::read_with` call tries to read `Workspace` through the entity map, finds it already leased, and panics. Release Notes: - Fixed a panic when opening the dev container modal via the `OpenDevContainer` action. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||