-
Notifications
You must be signed in to change notification settings - Fork 233
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
Layout is broken with 1.9.2 #704
Comments
If we had this testable via our CI (some how, not sure how we could) that'd be awesome. That'd assure our fix works across tmux versions and future PRs. |
@muraii If you (or anyone experiencing this) removes stuff from your config file, such as removing / commenting out I'm on tmuxp 1.9.2 + wsl 2 + tmux 3.2a and have gotten into a habit of redoing the layout by hand. This is one I need help on |
Removing ETA: I'm noticing that this problem is intermittent. I can't figure out what causes it to behave correctly or incorrectly. Could it happen because whatever the shell command I'm running with |
@muraii That is interesting though. There must be something timing-wise that we need to list to, so we change the layout at the correct time.
I think so - possibly. Assuming this is the cause, if we wanted to fix this, we'd need to make it so certain types of commands are queue'd / blocking / delay'd. Perhaps we can introduce something like: session_name: 'glorp'
# Reference this issue for why we need to use `source` here:
# https://github.com/tmux-python/tmuxp/issues/412
shell_command_before:
- command: source $(poetry env info --path)/bin/activate
wait: 500 or And maybe something that'd give it enough space in between. (still though, we're not sure this is a (or the root) cause of layout issues yet) |
I think this issue relates to #667 , which was reproduced in versions 1.7.2 and 1.9.2. I can reproduce it myself with this yaml: session_name: some
start_directory: ./
windows:
- focus: 'true'
layout: main-horizontal
options:
main-pane-height: 35
panes:
- pane
- pane
- pane
window_name: foo |
Did we ever get a test recreation of this breaking in a pull request? That would be very helpful. If anyone could assist / spend some time on it that'd be helpful! |
Regarding sleep, if you try
or docs: skip command execution session_name: 'glorp'
# Reference this issue for why we need to use `source` here:
# https://github.com/tmux-python/tmuxp/issues/412
shell_command_before:
- cmd: source $(poetry env info --path)/bin/activate
sleep_before: 1
sleep_after: 1
windows:
- panes:
- echo "hello" You'd this this would be possible session_name: 'glorp'
# Reference this issue for why we need to use `source` here:
# https://github.com/tmux-python/tmuxp/issues/412
windows:
- panes:
- shell_command:
- cmd: source $(poetry env info --path)/bin/activate
sleep_after: 1
- echo "hello" |
Hi @tony !
I just tried to run the tests on my computer and I get four failures in Of the four tests that fail two are caused by a window object being It might be related to this, it might not. Maybe something in my environment (and @muraii 's) that causes this failures are also causing the layout problem, which is still happening for me in |
Welcome @categulario!!
I'm interested if you were to check out a development environment and tweak around with
That may be the case indeed. Do you think you're reporting a potentially (perhaps new) test issue? If you do, maybe report in a new issue until we can tie it to this? Do you have |
I'll try to isolate the four exceptions (and the test hanging the whole test suite). Is there any advice/suggestions/protocols you follow to do this? I'm more of a print-debugger :P
Sure. Should I just open a tracking issue and attach the log?
I think the debug info includes the OS/Shell. |
I'm a bit sleepy now as I wake up early AM, but you can check out the source code and do
let me know if any of these help and I think you should repost this in a new issue and we continue from there (so we don't side-track in the event this is unrelated) |
I apologize for not replying earlier. I’ll do more testing to narrow the issue and get back to you.
…On May 16, 2022, 19:23 -0600, Tony Narlock ***@***.***>, wrote:
> I'll try to isolate the four exceptions (and the test hanging the whole test suite). Is there any advice/suggestions/protocols you follow to do this? I'm more of a print-debugger :P
I'm a bit sleepy now as I wake up early AM, but you can check out the source code and do tmuxp load . inside the git directory
• > make start to rerun on file change
• > test tests/test_workspacebuidler.py
env PYTEST_ADDOPTS="-s -x -vv tests/test_workspacebuilder.py" poetry run make start
• > test test_automatic_rename_option() in tests/test_workspacebuidler.py
env PYTEST_ADDOPTS="-s -x -vv tests/test_workspacebuilder.py::test_automatic_rename_option" poetry run make start
• > add assert False to stop at an area of code
• > use a debug loop
1. pip install ipython
2. env PYTEST_ADDOPTS="-s -x -vv --pdb --pdbcls=IPython.terminal.debugger:TerminalPdb" poetry run make start
3. you can now run pdb commands
let me know if any of these help
and I think you should repost this in a new issue and we continue from there (so we don't side-track in the event this is unrelated)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@categulario @muraii I updated the development docs, it's not a lot but should help a bit: https://tmuxp.git-pull.com/developing.html#test-runner |
Thanks for the updated docs @tony ! |
Fixes #368, as retry() in its current form is broke and won't work within a `with` block. The function is deprecated and will be removed in 0.13.x. 0.12.x will warn when using it. retry_until() is now available and will either raise or return False if raise=False is passed. See also: - tmux-python/tmuxp#620 - tmux-python/tmuxp#704 (comment)
…on#704 Use tmux default session size 80x24 when creating a new session
…on#704 Use tmux default session size 80x24 when creating a new session
…on#704 Use tmux default session size 80x24 when creating a new session
@muraii, @nodeselector, @samm81, @askielboe, @mohammadne v1.13.1 is live with a fix, via @nvasilas from #793 pip install tmuxp==1.13.1 Any better now? P.S. You may need to kill your tmux server or try on a fresh one by passing something like |
I see that you've just reverted it (temporarily), but wanted to say I got it installed before the revert and it seems to work great! thank you! I'm integrating |
Thanks for all your work on this, team. I updated to v 1.27.0 and still see the issue, fwiw (issue originally posted against v1.9.2). EDIT: I appear to have spoken too soon. I had shut down all sessions and retried but now that I've fiddled a bit more the layout appears to be correct on creating a new session. |
@muraii Could you share your config? I'm also still running into this problem every morning when I start my tmuxp config :D |
I haven't used this setup in a while, but I just tried it on two different machines with
|
@muraii @Bassadin @samm81 @sohang3112 I have a PR at #926 testing a fix for this longstanding issue. If you have any time to try it out, you can using these instructions. If you do, does it work any better? |
@tony I tried with |
Works like a charm for me now as well in Arch :) Thanks! |
@sohang3112 @Bassadin Thank you, both! With that in mind I will consider this issue fixed and close this. |
@tony I apologize for not having responded much after having opened the issue. I'm currently on Thanks for all the hard work over almost three years since I opened the issue. |
Step 1: Provide a summary of your problem
Specifying a
main-vertical
layout with amain-pane-width
attribute, or not, results in a main pane rendered with a width of 1 or 2 cells. This is very similar to #309, and may be identical in its root cause(s), but that issue was closed. Note that running this identical configuration on Ubuntu 18.04 withtmuxp
1.7.2 andtmux
2.6 renders the configuration as expected.Step 2: Provide tmuxp details
$ tmux debug-info
Step 3: Describe the problem:
Steps to reproduce:
tmuxp
withpipx
(unsure if relevant).tmuxp.yaml
configuration file as noted below.tmux
withtmuxp load .
Observed Results:
Notice the main pane is very narrow.
Expected Results:
After detaching and reattaching, the rendering corrects itself.
Relevant Code:
.tmuxp.yaml
Other output as requested for #309:
tmux show-window-options
tmux show-options
tmux show-window-options -g
tmux show-options -g
The text was updated successfully, but these errors were encountered: