Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix project_panel::NewDirectory in TextMate keymap #23825

Merged

Conversation

huacnlee
Copy link
Contributor

@huacnlee huacnlee commented Jan 29, 2025

Release Notes:

  • Fixed project_panel::NewDirectory, editor:: NewlineAbove in TextMate keymap.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 29, 2025
Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SomeoneToIgnore SomeoneToIgnore self-assigned this Jan 29, 2025
@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) January 29, 2025 08:18
@huacnlee
Copy link
Contributor Author

huacnlee commented Jan 29, 2025

Here still have another error, but that difference like this:

Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: Error loading built-in keymap \"keymaps/macos/textmate.json\": Errors in user keymap file.

In section with `context = \"Editor\"`:\n\n - In binding `\"cmd-alt-enter\"`, didn't find an action named `\"editor::NewLineAbove\"`." at crates/zed/src/zed.rs:1273:61

@huacnlee
Copy link
Contributor Author

Oh, it cause by upcase.

@SomeoneToIgnore

This comment was marked as resolved.

auto-merge was automatically disabled January 29, 2025 08:21

Head branch was pushed to by a user without write access

@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) January 29, 2025 08:22
@huacnlee
Copy link
Contributor Author

Maybe we can consider to let the keymap to case insensitive for avoid issue like this.

@SomeoneToIgnore SomeoneToIgnore merged commit 6d4ccb0 into zed-industries:main Jan 29, 2025
13 checks passed
@caius
Copy link
Contributor

caius commented Jan 30, 2025

This is causing the stable release to crash on macOS for me. Running Zed Preview works fine though. 🙃

@SomeoneToIgnore
Copy link
Contributor

  1. This cannot cause the stable release to crash, as it is not included there: current Stable is 0.171.x and you can check that in
    https://github.com/zed-industries/zed/blob/v0.171.x/assets/keymaps/macos/textmate.json#L73 (permalink)

  2. Zed Preview does include this commit, so it's a good confirmation that things are fixed with this PR (and not broken, as implied).

  3. Since you're posting this comment, can you make it informative and include the crash details? The backtrace would be very good to have.

@huacnlee
Copy link
Contributor Author

huacnlee commented Jan 30, 2025

➜  zed git:(webview) /Applications/Zed.app/Contents/MacOS/zed -v
[2025-01-30T21:19:50+08:00 ERROR zed::reliability] {
  "thread": "main",
  "payload": "called `Result::unwrap()` on an `Err` value: Error loading built-in keymap \"keymaps/macos/textmate.json\": Errors in user keymap file.\n\n\nIn section with `context = \"Editor\"`:\n\n - In binding `\"cmd-alt-enter\"`, didn't find an action named `\"editor::NewLineAbove\"`.\n\nIn section with `context = \"ProjectPanel\"`:\n\n - In binding `\"cmd-n\"`, didn't find an action named `\"project_panel::NewFolder\"`.",
  "location_data": {
    "file": "crates/zed/src/zed.rs",
    "line": 1189
  },
  "backtrace": [

The Preview version is no this error.

@caius
Copy link
Contributor

caius commented Jan 30, 2025

Think you might have misread what I said (and/or This isn't clear in my previous comment), Stable crashes if you set the base keymap to TextMate. Preview does not. This PR fixes that issue for Preview as you say, but Stable is currently broken if you have the TextMate keymap configured.

Crash report from Stable that led me to this PR

Thread 0 Crashed:: main Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x18e543720 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18e57bf70 pthread_kill + 288
2   libsystem_c.dylib             	       0x18e488908 abort + 128
3   zed                           	       0x108a2190c std::sys::pal::unix::abort_internal::hfc79d39ad7035235 + 12
4   zed                           	       0x10a504394 std::process::abort::ha5654e050dd7d7b8 + 12
5   zed                           	       0x109ba4a4c zed::reliability::init_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::h893a6486757a9c84 + 2068
6   zed                           	       0x108a1aa1c std::panicking::rust_panic_with_hook::h09e8a656f11e82b2 + 2856
7   zed                           	       0x108a19ec4 std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::h1230eb3cc91b241c + 140
8   zed                           	       0x108a17fec std::sys::backtrace::__rust_end_short_backtrace::hc3491307aceda2c2 + 12
9   zed                           	       0x108a19b98 rust_begin_unwind + 44
10  zed                           	       0x10a38ae5c core::panicking::panic_fmt::ha4b80a05b9fff47a + 48
11  zed                           	       0x10a38b1ec core::result::unwrap_failed::h441932a0bca0dd7f + 92
12  zed                           	       0x109b5fd30 zed::zed::load_default_keymap::h7f57e5bda5010af4 + 508
13  zed                           	       0x109b5f968 zed::zed::reload_keymaps::h861ca7367f54b272 + 36
14  zed                           	       0x109ad1b24 gpui::app::async_context::AsyncAppContext::update::hdbc0eb2f47f9d959 + 236
15  zed                           	       0x109c26f54 zed::zed::handle_keymap_file_changes::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h4de2881823d1013b + 364
16  zed                           	       0x109a7c2e8 async_task::raw::RawTask$LT$F$C$T$C$S$C$M$GT$::run::h1790fc6777597ac9 + 712
17  zed                           	       0x106d7cbe8 gpui::platform::mac::dispatcher::trampoline::he44a30fa45bc2858 + 20
18  libdispatch.dylib             	       0x18e3c95b4 _dispatch_client_callout + 20
19  libdispatch.dylib             	       0x18e3d8040 _dispatch_main_queue_drain + 984
20  libdispatch.dylib             	       0x18e3d7c58 _dispatch_main_queue_callback_4CF + 44
21  CoreFoundation                	       0x18e6a39d0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
22  CoreFoundation                	       0x18e6635bc __CFRunLoopRun + 1996
23  CoreFoundation                	       0x18e662734 CFRunLoopRunSpecific + 588
24  HIToolbox                     	       0x199bd1530 RunCurrentEventLoopInMode + 292
25  HIToolbox                     	       0x199bd7348 ReceiveNextEventCommon + 676
26  HIToolbox                     	       0x199bd7508 _BlockUntilNextEventMatchingListInModeWithFilter + 76
27  AppKit                        	       0x1921da848 _DPSNextEvent + 660
28  AppKit                        	       0x192b40c24 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
29  AppKit                        	       0x1921cd874 -[NSApplication run] + 480
30  zed                           	       0x106d8b864 _$LT$gpui..platform..mac..platform..MacPlatform$u20$as$u20$gpui..platform..Platform$GT$::run::hd0ee16263de297ec + 732
31  zed                           	       0x109a6020c gpui::app::App::run::h4f5207cd4b35f507 + 312
32  zed                           	       0x109abdd44 zed::main::h88f3a09dce881f8b + 5692
33  zed                           	       0x109b8b3f4 std::sys::backtrace::__rust_begin_short_backtrace::hc0f345d5f84f60be + 12
34  zed                           	       0x109bb5eb4 std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h105b84ac8607b40f + 16
35  zed                           	       0x108a09b54 std::rt::lang_start_internal::hdd117cb81a316264 + 808
36  zed                           	       0x109abffe8 main + 52
37  dyld                          	       0x18e1fc274 start + 2840

@huacnlee
Copy link
Contributor Author

@SomeoneToIgnore
Copy link
Contributor

Ah, I see, "this" as in "this issue", not "this PR".
Thanks, will cherry-pick to stable for the next patch release.

@SomeoneToIgnore
Copy link
Contributor

/cherry-pick v0.171.x

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 30, 2025
Release Notes:

- Fixed incorrect action names in TextMate keymap.
@huacnlee
Copy link
Contributor Author

Haha, it seems that not many people use TextMate keymap.

SomeoneToIgnore pushed a commit that referenced this pull request Jan 30, 2025
) (#23905)

Cherry-picked Fix `project_panel::NewDirectory` in TextMate keymap
(#23825)

Release Notes:

- Fixed incorrect action names in TextMate keymap.

Co-authored-by: Jason Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants