zed/crates
Max Brunsfeld 571151173c
Fix copilot state corruption when there are multiple buffers with the same remote id in different projects (#2569)
Fixes
https://linear.app/zed-industries/issue/Z-1511/thread-main-panicked-at-assertion-failed-left-==-right-left-local-0-1

Previously, when exchanging messages about buffers with a copilot
language server, we identified buffers using their **remote id**. This
caused problems when there were multiple projects open, where one or
more were remote, because buffers' remote ids are only unique within a
given project.

When you have multiple projects open, and one or more of the projects is
remote, it's pretty easy to have two buffers open with the same remote
id. In my testing, when this happened, copilot would stop working in
both buffers. But I believe that depending on the editing patterns that
occur in the two buffers, it could cause the crash reported in the
Linear issue above.

This PR changes our copilot logic to use buffers' local handle ids for
identifying them. This fixed the problems I was able to reproduce when
using copilot in both remote and local projects.

Release Notes:

- Fixed a crash that would sometimes occur when editing buffers after
having collaborated on a remote project.
2023-06-05 14:33:56 -07:00
..
activity_indicator Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
ai Properly display labels for currently opened external files 2023-05-26 15:44:44 +03:00
assets 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
auto_update WIP: Stream in completions 2023-05-22 20:28:22 -06:00
breadcrumbs Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
call 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
cli Fix typos 2023-06-02 22:02:19 -04:00
client Remove code sending zed events to mixpanel 2023-06-05 15:33:17 -04:00
clock 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
collab Add support for folder-specific settings (#2537) 2023-05-31 16:27:08 -07:00
collab_ui Fix typos 2023-06-02 22:02:19 -04:00
collections Move command palette filter into collections crate 2023-03-28 20:13:17 -07:00
command_palette Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
context_menu Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
copilot Use local ids, not remote ids, to identify buffers to copilot 2023-06-05 14:12:19 -07:00
copilot_button Make language_settings take a language, not a language name 2023-05-31 15:10:30 -07:00
db WIP 2023-05-22 23:11:27 -06:00
diagnostics Fix tests 2023-05-25 14:29:28 -04:00
drag_and_drop Prevent some cases of clipping icons due to pixel coord rounding 2023-05-08 11:42:00 -04:00
editor Stop sending editor events to mixpanel 2023-06-05 15:09:47 -04:00
feedback Add additional panic information to panic events 2023-06-01 23:34:39 -04:00
file_finder Shorten full paths with ~ 2023-05-27 01:21:38 +03:00
fs Fix typos 2023-06-02 22:02:19 -04:00
fsevent 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
fuzzy remove commented line 2023-02-27 12:06:10 -08:00
git Clean up final remaining code paths calling old diff update method 2023-05-25 14:41:09 -04:00
go_to_line Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
gpui Update rust-bindgen dev-dependencies (#2563) 2023-06-05 09:21:07 -04:00
gpui_macros Move methods querying window state into AsyncAppContext 2023-05-02 19:38:48 +02:00
install_cli 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
journal Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
language Fix typos 2023-06-02 22:02:19 -04:00
language_selector Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
live_kit_client Merge remote-tracking branch 'origin/main' into zmd 2023-05-24 11:04:07 -06:00
live_kit_server 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
lsp Update LSP to the newest version 2023-05-28 21:55:08 +03:00
lsp_log Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
media Update rust-bindgen dev-dependencies 2023-06-04 23:34:22 -04:00
menu Remove internal actions from menu crate 2023-04-27 14:29:11 +02:00
node_runtime Source ESLint server from Github rather than 3rd party NPM package 2023-04-28 16:42:36 -04:00
outline Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
picker Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
plugin 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
plugin_macros Fix typos 2023-06-02 22:02:19 -04:00
plugin_runtime Fix typos 2023-06-02 22:02:19 -04:00
project Fix typos 2023-06-02 22:02:19 -04:00
project_panel Fix duplicate item creation in project panel 2023-05-26 02:07:25 +03:00
project_symbols Fix typos 2023-06-02 22:02:19 -04:00
recent_projects Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
rope editor: add select previous command (#2556) 2023-06-02 17:32:34 +02:00
rpc Fix typos 2023-06-02 22:02:19 -04:00
search Change "Project search" to "Project Search" 2023-06-01 12:31:37 +02:00
settings Avoid writing spurious nulls to settings file when updating it programatically 2023-06-02 13:02:17 -07:00
snippet 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
sqlez Fix typos 2023-06-02 22:02:19 -04:00
sqlez_macros 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
staff_mode 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
sum_tree Made the map seek target a publicly implementable interface 2023-05-12 08:37:32 -07:00
terminal Fix typos 2023-06-02 22:02:19 -04:00
terminal_view Fix typos 2023-06-02 22:02:19 -04:00
text Fix typos 2023-06-02 22:02:19 -04:00
theme Seperate pane and panel styling 2023-05-30 16:23:16 -07:00
theme_selector Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
theme_testbench Move font size adjustment code to the theme crate 2023-05-17 15:56:32 -07:00
util Add file and line number information to logs 2023-06-05 12:53:37 -07:00
vim Fix typos 2023-06-02 22:02:19 -04:00
welcome WIP: Remove focus side effects from toggle dock commands 2023-05-30 12:00:15 -07:00
workspace Fix typos 2023-06-02 22:02:19 -04:00
zed Remove code sending zed events to mixpanel 2023-06-05 15:33:17 -04:00