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

Add delay to fix race condition preventing panes from spawning. #3

Closed
wants to merge 1 commit into from

Conversation

jedis00
Copy link

@jedis00 jedis00 commented May 6, 2020

@bet4it
Copy link
Owner

bet4it commented May 6, 2020

I find a better way 😅

diff --git a/bin/hyperinator b/bin/hyperinator
index 29c0aef..ce06d12 100755
--- a/bin/hyperinator
+++ b/bin/hyperinator
@@ -63,7 +63,9 @@ function start() {
         console.error(err)
         return
       }
-      console.log(`[hyperinator config: ${cfgPath}]`)
+      setTimeout(() => {
+        console.log(`[hyperinator config: ${cfgPath}]`)
+      }, 100)
       break
     default:
       console.error('Unknown command!')
diff --git a/package.json b/package.json
index cb58813..345db0e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "hyperinator",
-  "version": "0.4.1",
+  "version": "0.4.2",
   "description": "A layout automation plugin for Hyper.app",
   "repository": "bet4it/hyperinator",
   "author": "Bet4 <[email protected]>",

@jedis00
Copy link
Author

jedis00 commented May 6, 2020

Seems to work fine! Closing this one.

@jedis00 jedis00 closed this May 6, 2020
@jedis00
Copy link
Author

jedis00 commented May 6, 2020

@bet4it git diff appears to break Hyper with this patch. I can't press q to exit out of the diff. It hangs. No other combo of CTRL+C, CTRL+Z seem to work. Have to kill bash. It works fine with Git Bash itself, just Hyper is effected.

@bet4it
Copy link
Owner

bet4it commented May 6, 2020

Could you confirm that all the problems you faced have been fixed in the latest release?

@jedis00
Copy link
Author

jedis00 commented May 8, 2020

@bet4it No. git diff is still broken. When scrolling a multi-line diff, you cannot exit out of it by pressing q. The pane is frozen and the bash process needs to be killed.

@bet4it
Copy link
Owner

bet4it commented May 9, 2020

Can't reproduce, again😅
But this should happen only when you read hyperinator's code, which is quite uncommon for most people. Let's just ignore it😃

@jedis00
Copy link
Author

jedis00 commented May 9, 2020

No, it’s an issue with any git repo. I wasn’t doing a diff in hyperinator but something for work. The git diff command is completely broken in Hyper with this patch. Still works fine in a regular git bash shell.

@bet4it
Copy link
Owner

bet4it commented May 9, 2020

diff --git a/bin/hyperinator b/bin/hyperinator
index 29c0aef..ce06d12 100755
--- a/bin/hyperinator
+++ b/bin/hyperinator
@@ -63,7 +63,9 @@ function start() {
         console.error(err)
         return
       }
-      console.log(`[hyperinator config: ${cfgPath}]`)
+      setTimeout(() => {
+        console.log(`[hyperinator config: ${cfgPath}]`)
+      }, 100)
       break
     default:
       console.error('Unknown command!')

Do you mean this patch introduce the bug? That's impossible! This patch doesn't change anything if you don't use hyperinator. This bug must exist in prior version.
So this bug happens even you don't use hyperinator to create the layout? Could you help me figure out which version introduce this bug?

@bet4it
Copy link
Owner

bet4it commented May 9, 2020

Is this a bug of other plugins? You may add other plugins back recently.

@jedis00
Copy link
Author

jedis00 commented May 9, 2020

I’m not sure if it was specifically that patch or another we tried.

I did add hyperpane back because I liked having the label in the top left corner of the pane that showed the keyboard shortcut to use to swap to that active pane.

@bet4it
Copy link
Owner

bet4it commented May 9, 2020

Yeah, hyper-pane is very useful and I also use it. I don't think it's the culprit.
Hope for more information.
You could change the plugins section of .hyper.js to something like hyperinator#0.4.0 to adjust its version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants