vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 63 forks source link

Emacs hangs when submitting a pull request on MacOS #341

Closed jtrim closed 6 years ago

jtrim commented 6 years ago

Emacs version: GNU Emacs 25.3.1, installed via homebrew MacOS version: 10.13.4 Git version: git version 2.15.1 (Apple Git-101) Homebrew Formula Info:

$ brew info emacs
emacs: stable 25.3 (bottled), devel 26.1-rc1, HEAD
GNU Emacs text editor
https://www.gnu.org/software/emacs/
/usr/local/Cellar/emacs/25.3 (4,054 files, 119.5MB) *
  Built from source on 2018-02-05 at 16:39:46 with: --with-cocoa --with-ctags --with-gnutls --with-librsvg --with-mailutils --with-imagemagick@6 --with-modules
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/emacs.rb
==> Dependencies
Build: pkg-config ✔
Optional: dbus ✘, gnutls ✘, librsvg ✘, imagemagick@6 ✘, mailutils ✔
==> Options
--with-cocoa
        Build a Cocoa version of emacs
--with-ctags
        Don't remove the ctags executable that emacs provides
--with-dbus
        Build with dbus support
--with-gnutls
        Build with gnutls support
--with-imagemagick@6
        Build with imagemagick@6 support
--with-librsvg
        Build with librsvg support
--with-mailutils
        Build with mailutils support
--with-modules
        Compile with dynamic modules support
--without-libxml2
        Don't build with libxml2 support
--devel
        Install development version 26.1-rc1
--HEAD
        Install HEAD version
==> Caveats
Please try the Cask for a better-supported Cocoa version:
  brew cask install emacs

To have launchd start emacs now and restart at login:
  brew services start emacs
Or, if you don't want/need a background service you can just run:
  emacs

Backtrace: None available

Description of the problem: I can go through most of the process for submitting a pull request with a push remote set, but after I select the base branch, Emacs hangs completely and I hear a very rapid succession of terminal bells until I kill the emacs process. I'm running Emacs in client/server mode.

Other communication with Github seems to be working as I can get a list of open issues and pull requests without any problems.

Steps to reproduce:

  1. With magithub installed, open a magit status window
  2. H p
  3. Select a remote (in my case, origin, which is the only github remote I have set up)
  4. Select a head branch (in my case, the branch I'm currently on, branched from master)
  5. Select a base branch (in my case, master)
  6. Enter y to confirm 'You are about to create a pull request to merge branch into ; is this what you wanted to do? (y, n, C-u*)'
  7. Emacs hangs

Sorry, I know this may be difficult to track down without any kind of backtrace. Let me know if I can provide anything else.

vermiculus commented 6 years ago

If you M-x toggle-debug-on-quit, you can get a backtrace.

It's very interesting that You are about to create a pull request to merge branch into ; is this what you wanted to do? (y, n, C-u*) is your message – is that it exactly?

I use macOS as my primary dev environment, so I'm not sure what would be different here.

jtrim commented 6 years ago

It's very interesting that You are about to create a pull request to merge branch into ; is this what you wanted to do? (y, n, C-u*) is your message – is that it exactly?

No, sorry about that, editing mistake on my part. Although in revisiting the message, I noticed something interesting. Here's exactly what I'm seeing:

You are about to create a pull request to merge branch `[org]:[branch-name]' into [org]/[repo]:master; is this what you wanted to do? (y, n, C-u*)

-- notably, the merge branch is missing the repo name, where the base branch includes it. Note that I've replaced the actual org, branch name, and repo strings with [org], [branch-name], and [repo] above.

With regard to:

If you M-x toggle-debug-on-quit, you can get a backtrace.

I've never used that before, but per the docstring for that function, I should be able to press C-g and get a debugger, but when I try that Emacs remains unresponsive. It seems like maybe Emacs has fallen into an infinite loop that it never exits from. I also tried toggle-debug-on-error without success.

vermiculus commented 6 years ago

I usually have to hold C-g to make sure emacs sees it when it occasionally checks for input.

jtrim commented 6 years ago

I usually have to hold C-g to make sure emacs sees it when it occasionally checks for input.

Okay, sorry for the delay. I had a chance to try this again and still no luck getting a debugger to start when Emacs hangs. I'm happy to try a screen share to demo the problem for you if that's helpful.

jtrim commented 6 years ago

I just took a sec to try this with only the magit and magithub packages installed and emacs doesn't hang, so that's progress at least. I'll report back when I've isolated which dependency is causing the problem.

jtrim commented 6 years ago

I'm closing this for now. I got it working and I'm not exactly sure what I did (other than nuke my elpa directory and re-install everything), so I'm chalking this up to some bad interaction related to my specific config. If this pops up again for me I'll post a note. Thanks!