-
Notifications
You must be signed in to change notification settings - Fork 23
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
Activating the pipenv sometimes hangs #25
Comments
Hi there @brettatoms This commit was a fix for such. race condition cee6bc5 Can you please let me know which version of |
I am running the latest in melpa which is commit 8298dae |
Hey @pwalsh, thanks for pipenv.el! I have been experiencing the race condition/hang on activate as well, happening about 1/10 times. It looks like I'm on 8298dae as well (spacemacs develop branch). I was able to make it happen consistently by reducing the sit-for time in the pipenv--force-wait function from 0.1 to 0.01. Increasing to 1.0 or whatever (making it very large doesn't seem to have any adverse effect... the sit-for returns when the process finishes, maybe?) seemed to make the race condition less likely to occur. But that was all on my work computer (maybe relevant that it is OSX, but not at all sure). Now I'm home I can't reproduce the hang. |
I encountered this bug as well |
hey @SirJls can you provide some details on when this occurs. |
@pwalsh This happens to me almost daily. It usually seems to happen when I switch between files in different projects with different pipenv environments so pipenv.el as activated when the projectile project changes. Usually I can hit Ctrl-G to cancel it and then call |
@brettatoms cool. I've tried to reproduce with tests and in usage myself and have not. I will look at it when I can, but also happy for contributions. |
@pwalsh If I can come up with a reliable fix I'll definitely submit a PR. Also, I'm using Spacemacs development branch if that helps anyone else reproduce the problem. |
Sometimes the process status for (pipenv-venv) never leaves the "run" state and therefore the loop in (pipenv--force-wait) spins forever and causes the (pipenv-activate) to hang. This commit replaces the wait loop with a process sentinel that is called when (pipenv-venv) returns inside of (pipenv-activate) Fixes pwalsh#25
Sometimes the process status for (pipenv-venv) never leaves the "run" state and therefore the loop in (pipenv--force-wait) spins forever and causes the (pipenv-activate) to hang. This commit replaces the wait loop with a process sentinel that is called when (pipenv-venv) returns inside of (pipenv-activate) Fixes pwalsh#25
Sometimes the process status for (pipenv-venv) never leaves the "run" state and therefore the loop in (pipenv--force-wait) spins forever and causes the (pipenv-activate) to hang. This commit replaces the wait loop with a process sentinel that is called when (pipenv-venv) returns inside of (pipenv-activate) Fixes pwalsh#25
Sometimes
(pipenv-activate)
hangs. It appears to happen in the(pipenv--force-wait (pipenv-venv))
call. The while loop inpipenv--force-wait
spins forever when it happens but it doesn't always happen. At first it appears that emacs locks up but I can get back control with aC-g
. I put a(message "waiting...")
in that loop and that seemed to fix it or at least caused it to happen less often so it feels kind of like a race condition.The text was updated successfully, but these errors were encountered: