-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve fish 4.0 shell support #4597
Comments
|
Yes, I don't like the environment variable thing all... Is it possible for fish to parse our version from mc --version? If this is not practical, maybe we could consider exporting a generic MC_VERSION variable? |
I just sent an updated patch series to the mailing list,
Let me know if there is anything else for me to do; I realize I didn't add a changelog entry; not sure if that's necessary. |
Could you please just attach them here (git format-patch HEAD~~)? I'm not sure if there are any differences otherwise and it's really painful to save messages and upload. I will remove my first comment. |
|
|
|
|
Ok done. |
Thank you! I hope we solve the familiarity problem by dropping Trac one day... instead of adding more info to the README. But good point, need to check what it says now. Not very smart if it currently says to send patches to the mailing list, then ask people to post to Trac on the mailing list. |
I personally enjoy using mailing lists but I can see how they are not for everyone. There's an initial barrier to entry that most potential contributors won't cross. Some projects offer multiple avenues for sending patches (for example both Github and a mailing list), I think that's often a good choice |
Do you feel like there should be more thought spent on "MC_VERSION"? |
I really don't like exporting it. It would be good to know what Andrew thinks about it...
Regarding lists, it's just an impractical way for us to keep track of patches right now. We need a central place, or things are bound to get lost or forgotten, as is currently the case with mailing lists and GitHub, and currently that central place is Trac. I hope that one day we'll get to GitHub and decommission everything else (Trac), but there's still a lot of work to be done to make that happen. |
i suggest emulating what shells do: set the version variable without exporting it. that would imply injecting an additional command early during the subshell setup. |
|
|
There is no need to write "Ticket #XXXX:" in the 2nd, 3rd, etc. commits in the branch. |
I see, I didn't realize there will already be a merge commit to group commits |
I will clean up, rebase and merge as soon as CI is in. |
Rebased on current master so that this branch gets CI and cleaned up as promised. |
Hmmm, build on macOS breaks:
|
Could probably use sizeof(subshell_switch_key_csi_u) - 1 as a workaround. |
I've pushed a fixup and it indeed fixed the CI! Actually, this sounds like a compiler bug to me. I can't reproduce it locally with clang 16, but it does fail on macOS inside GitHub. No other platform with clang is failing though (FreeBSD is fine)... oh well, if it works - so be it. |
Thanks! The corresponding change has been merged to fish as well. |
Fantastic, whenever I stumble upon a FISH ticket while triaging, I'll put you on CC. It's always of great help to have someone in the know... Schönes Wochenende! |
Unfortunately, situation became worse after upgrading from fish 3.7.2 to fish 4.0. Typical steps to reproduce:
So, it looks like there might be some race somewhere? And some characters are not seen by mc and / or terminal breaking navigation? Any ideas how this could be debugged? I'm running fish inside iTerm2. |
@krobelus, could you please be so kind to take a look? We don't use Fish ourselves. I'm not sure if this is related to your updates to the CSI parser in preparation for Fish 4.0, or if it's a completely new, unrelated issue, so I'm reluctant to reopen this ticket. |
I am fine to try to debug stuff by myself, but some guidelines would be welcome, as this is not something I am very familiar with. |
I'll certainly try. Unfortunately I haven't been able to reproduce this. I think it's possible that it's race conditions with SIGSTOP. We should try to insert sleeps in the right places to confirm. As for debugging, I'll try to come up with some advice if I don't manage to reproduce it. |
Hey, thanks for the feedback! Please let me know if I should reopen if you think it's really the same issue, or feel free to open a new one and mention this one if it's similar, but something different. |
So, I manage to halt it again here, but the symptoms are different (so might be different issue here):
I believe I saw this case multiple times before (with fish 3.7.2), so might be different (older) issue UPS: Yes, running Trying to see what's going on with the second one... |
The second case is waiting in
If I allow it to continue, then it resumes again. Does this ring any bell? |
|
Well, it seems it is spinning here: https://github.com/MidnightCommander/mc/blob/master/src/subshell/common.c#L544 But it looks like the signal is sent to the parent process somehow, but not to the child? But so far, I think all the cases of this freeze I seen is when I changed the directories. |
I have not followed the subshell logic fully as it is quite convoluted, but it seems there might be race in For me it usually it happens during navigation (so I just verified, if I'd do @zyv Does this ring any bell? What if subshell is fast enough to signal before |
@asl Thanks for the details! Yes, it does ring a bell, it seems to me that you're running into #4071, which is still open - and that's a completely different issue from what's being discussed here. It could (unfortunately) very well be that there is a race, and it's not usually triggered by "fast" subshells like Sadly, it's not an easy bug to fix (at least not for me). The whole mc architecture has evolved over 30 years in an incredibly racy and brittle way, which mainly manifests itself in two directions. One is the interaction with the terminal, and the other is the interaction with the subshell. We have plugged holes in the terminal interaction, and a little bit on the subshell side, but apparently the "right" solution would be a major refactoring introducing an event loop. However, we don't have the resources for such an undertaking at the moment. If someone comes along and offers to plug a particular hole, we will try to get it in... Who knows, maybe you don't have enough challenges in your life and this might pique your interest :) |
Yes, looks like it is another instance of it, I tried to find the issue, but for some reason was unable to do this. It seems it started to appear more often to me somehow after fish upgrade. |
Midnight Commander 4.8.33 knows how to read the CSI u encoding of ctrl-o (which is the only key it reads while the shell is in control). But it fails to when numlock or capslock is active. Let's disable the kitty keyboard protocol again until mc indicates that this is fixed. Closes #10640 The other issue talked about in that issue is an unrelated mc issue, see MidnightCommander/mc#4597 (comment)
Important
This issue was migrated from Trac:
zaytsev
(@zyv)aclopte@….com
(@krobelus)Patches from the mailing list:
v1:
v2:
Note
Original attachments:
johannes
(@krobelus) onOct 12, 2024 at 10:07 UTC
johannes
(@krobelus) onOct 12, 2024 at 10:07 UTC
johannes
(@krobelus) onOct 12, 2024 at 10:07 UTC
johannes
(@krobelus) onOct 23, 2024 at 18:23 UTC
The text was updated successfully, but these errors were encountered: