Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up"no previous window" error message #364
Comments
|
I also see this, when switching to a session that has only one window. Once I've created a second window in the target session (it can be subsequently deleted) I no longer see the "no previous window" error message. I'm using tmuxp 1.4.0 and tmux 2.6 in MacOS 10.13.3. |
|
@cowboy have you tried to use the pinned versions I mention to avoid the issue? |
|
Maybe it would make sense to only create the hook based on a condition of current windows/panes open? Or to make the conditions of the hook more specific? |
|
As an idea, it'd be helpful to create a test case / PR that recreates this error. |
|
My test case is just:
Is anything left to describe how to reproduce it? Also, same thing in the previously auto closed issue:
|
|
Yeah I'm reproducing it. Thanks for that The other issue is I haven't been building regression test suites for stuff like this. Without that it turns into a whack-a-mole where fixing one bug, unveils another. We already have a pretty solid test suite actually. It's probably not necessary in this situation, but if hypothetically, an issue was recreated in the test suite it helps me to debug it. I know it takes time. I'm stretched a bit thin and need help with the project. It helps with the regression part of it. The most important thing is this project needs right now is helpers that can pitch in time. I'm happy documenting it, improving the test suites a bit more, etc. |
|
@oblitum Yeah #312 needs a regression suite built around it. It's necessary because 2.6 introduced an issue where the dimensions of unattached screens can't calculate layout info/switch layouts. get what I mean? That's why the hook was added. The the thing is, the hook may need to be tailored to fit more specific instances so issues like this don't bubble up. Whether it's:
|
|
I don't know what you mean. I'm still frozen on tmuxp 1.3.2/libtmux 0.7.4 because it works, and I'm on tmux 2.6. |
That post was purely development related: Tests need to be written to recreate the bugs, and to make sure that bugs that take time to replicate are automatically checked for to make sure they don't come up again. https://en.wikipedia.org/wiki/Regression_testing Are you having this issue on the latest tmuxp/libtmux? I'm assuming yes, because I created it. I reopened #316 to look at recreating/getting more info on that |
As I reported:
I just tried 1.4.0 once, hopping this got fixed, and then went back to 1.3.2.
??? |
I meant that I don't know what you mean with "It's necessary because 2.6 introduced an issue where the dimensions of unattached screens can't calculate layout info/switch layouts. get what I mean? That's why the hook was added", which is not purely development related, it tells about some feature that looks like it should be crucial for me as a user on tmux 2.6, but which in truth I have no idea about, hence I said I'm on tmuxp 1.3.2 without issues, 1.3.2 doesn't try to cover this hook thing or whatever was added in #312 which is causing the issues. |
|
Got it. Added explanation: tmux 2.6 requires that tmuxp's workspace builder, in some fashion, adds a hook to handle layout stuff. What this means is layout proportional stuff is deferred until the user attaches the session itself. That's what #312 did. It's possible we may even need similar fixes for focus stuff with a hook, (e.g. #326/#370), but I haven't checked yet. |
|
@cowboy I state in the issue description that tmuxp 1.3.2/libtmux 0.7.4 is the last release that's usable. |
|
+1 can confirm - am having this issue and reverting to 1.3.2 fixes it. |
|
@rjkat @oblitum If you would like to carve out a minimal PR that fixes the issue, that would be helpful. That way the specific line or lines of code causing the issue would be established in a diff. The reason why is the thread seems to speak of whether the changes in #309/#312 were justified or not. No need to address the older issues at this point. All that's needed is a minimal PR |
|
I just started working with tmuxp (tmuxp 1.5.1, tmux 2.9a), and I'm seeing the same issue: whenever I start load a session with
|
|
If anyone is looking for a low effort fix, you can add a second window to your projects session_name: example
windows:
- window_name: terminal
panes:
- pane
- window_name: exit
panes:
- exit |
|
Status:
Can someone create a PR that recreates this issue in pytest (so its reproduced in our CI?) Also - is there any proposed fix to #364 / 1.4.0's change that gets us the same effect #312 has? (context here) cc: @kintsugi @larsks @rjkat @oblitum Are there any common denominator to systems where this does and doesn't happen? |
|
@oblitum I'm referring to reproducing it on CI (e.g. having it created / asserted via pytest) - we don't have that, right? Thanks for pointing me to #364 (comment) as that does jog my memory a bit |
afaik, no. |
|
@oblitum My aim / intention is to get this fixed before tmuxp's python 2.7 is dropped |
Following from #316 that got automatically closed, the problems still persist. The tmux message "no previous window" always shows up when switching between tmuxp created sessions. This started when #312 got merged in an attempt to fix #309, but whose sole solution was actually provided for libtmux here and merged here, the rest that was added as an attempted solution is solely causing misbehavior when compared to tmuxp 1.3.2/libtmux 0.7.4.
System:
To reproduce it's solely necessary, from inside a tmux session, to load another one through tmuxp (
tmuxp load -y ./foo.yaml). When you switch between sessions, the error message shows up on the newly created session.For me on ArchLinux, tmuxp 1.3.2/libtmux 0.7.4 is still the last release that's usable.