GitDiff icon indicating copy to clipboard operation
GitDiff copied to clipboard

Plugin failure in Xcode 6.1.1

Open clozach opened this issue 11 years ago • 16 comments

Whether installing via Alcatraz, or by downloading and building the GitDiff project, I consistently get this when restarting Xcode:

GitDiff Plugin: Could not load colors interface. If problems persist, please download and build from the sources on GitHub. [Goto Github] [OK]

Not sure where to go from here. Seems like I'm not the only one to have experienced this, fwiw: https://github.com/supermarin/Alcatraz/issues/202

clozach avatar Dec 07 '14 00:12 clozach

I have never had problems installing the plugin the plugin if you go to https://github.com/johnno1962/GitDiff download the zip and build which installs it. For good measure do a build clean first to remove the corrupt plugin. This has been an issue when using Alcatraz since Xcode 6

johnno1962 avatar Dec 07 '14 02:12 johnno1962

I have the same problem with the current Beta (Xcode6-Beta2, but had it with earlier versions too). I tried cloning the repo and installing from there and installing from the zip multiple times, and while I get no error messages there are no indicators showing up either. Any idea what else to try?

acdpnk avatar Dec 15 '14 15:12 acdpnk

If you're not getting the "Could not load colors interface" the plugin is installed fine so your problem is a different one. Do you see the Edit/GitDiff menu item? Also, Gitdiff does not show staged changes. Could that be what's happening? The last thing to try is git diff from the command line in the directory of the file. If nothing is shown GitDiff has nothing to display.

johnno1962 avatar Dec 15 '14 15:12 johnno1962

At this point my guess is there's something wrong with Alcatraz. I have it installed, and tried installing GitDiff through that, got the "Could not load colors interface" message and installed from source. I tried everything you suggested, so I can say pretty sure now that yes, GitDiff is installed, yes, there are changes, and no, the changes are not displayed by GitDiff. Perhaps the Alcatraz version of GitDiff wasn't properly removed?

acdpnk avatar Dec 15 '14 16:12 acdpnk

There is some interaction with Alcatraz and Xcode 6 that causes the missing nib problem but it sounds like you have the plugin installed now. Have you verified the git diff command displays differences? If it doesn't the plugin has nothing to go on.

johnno1962 avatar Dec 15 '14 17:12 johnno1962

Yes, there are definitely changes in the file I am viewing that git diff is showing. Could I unwittingly have deactivated the plugin or anything like that?

Update: tried it in Xcode 6.1.1, same problem.

acdpnk avatar Dec 15 '14 17:12 acdpnk

Sorry for the delayed response, John...and Happy Holidays!

Sadly, Xcode is still not showing diffs in the Standard editor, and I'm not sure how to troubleshoot this further.

Taking the full discussion above into account, here's what I tried this morning, quitting and restarting Xcode between every step, Just In Case™:

  1. Move all plugins, including Alcatraz, out of ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins
  2. Download https://github.com/johnno1962/GitDiff
  3. Open GitDiff project, Clean, and Clean Build Folder...
  4. Build GitDiff
  5. Verify that GitDiff.xcplugin is in above Plug-ins folder & Xcode has 3 menu items under Edit > GitDiff (3.6)
  6. Make changes to a file and save, verifying that changes are present (git diff in console)

Configuration: Yosemite 10.10.1 (14B25) Xcode 6.1.1 (6A2008a)

clozach avatar Dec 28 '14 19:12 clozach

Hi Chris, Seasonal Greetings to you and sorry for the rather curt last response. I don’t really know what to offer by way of a suggestion unless you can send me an example project that is not working along with it’s repo. You deinitely have the plugin loading now if you can see the edit menu and I’ve checked Xcode 6.1.1 and “it works for me”! You’re sure your changes aren’t staged?

johnno1962 avatar Dec 29 '14 10:12 johnno1962

I can of course send you an example project. What exactly do you need?

"Next Change"/"Previous Change" work fine - I never used that feature, but I guess if a line is highlighted by that it should also have the gutter mark, right?

acdpnk avatar Jan 15 '15 14:01 acdpnk

Same problem with the plugin having the same configurations as @clozach.

joelmarquez90 avatar Jan 15 '15 14:01 joelmarquez90

I finally took the time to create a sample project for you, @johnno1962, only now GitDiff is working! No idea what changed, but here's what I did in case it helps someone else.

  1. Create sample project w/git and make 2 changes: one unstaged and, for good measure, one staged.
  2. Quit Xcode
  3. Manually remove all plugins from ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/
  4. Remove GitDiff plugin from ~/Library/Application\ Support/Alcatraz/Plug-ins
  5. Download GitDiff zip: https://github.com/johnno1962/GitDiff/archive/master.zip
  6. Build GitDiff project
  7. Open sample project: GitDiff working
  8. Quit Xcode, drag in a single plugin, and retry step 7
  9. Run Alcatraz in Xcode...all seems OK
  10. Check ~/Library/Application\ Support/Alcatraz/Plug-ins: Alcatraz copied working GitDiff back in there, and all continues to function.

clozach avatar Jan 15 '15 16:01 clozach

Hi, interesting that the “Next Change/Previous Change” works fine. Sounds like the margin markers were being drawn with an alpha of 0. Have you tried changing the color preferences and saving them?

Update after Chris' last comment: Just weird. Seems to be project specific in some way. No idea what’s going on :(

johnno1962 avatar Jan 15 '15 16:01 johnno1962

I had line numbers hidden. That was the problem. When line numbers are visible, so are the GitDiffs's gutter marks, and vice versa. Can anyone confirm that behaviour?

acdpnk avatar Mar 10 '15 22:03 acdpnk

Err yes, that’s a known limitation as GitDiff swizzles the line number drawing code. Apologies

johnno1962 avatar Mar 11 '15 00:03 johnno1962

No worries. Is that documented somewhere?

acdpnk avatar Mar 11 '15 11:03 acdpnk

It is now!

johnno1962 avatar Mar 11 '15 15:03 johnno1962