Thursday, February 19, 2009

Eclipse + Subversion

One of the problems with third party add-on/plug-in architectures, like Eclipse or Firefox is that installing the software isn't enough, you also have to reinstall all your add-on's.

You would think that since this is such a common issue that there would be tools to ease this process but I haven't encountered any. You should at least be able to export a list of add-on's from one installation and import them into another. You can sync your bookmarks and passwords in Firefox (with add-ons) but you can't sync your add-on's.

After reinstalling Eclipse (eclipse-java-ganymede-SR1-macosx-carbon.tar), one of the first things I needed was access to Subversion. Eclipse comes with support for CVS but not Subversion, even though most people moved from CVS to SVN long ago, and are now moving from SVN to Git.

I've been using Subclipse but I thought I'd check if that was still the best option. I found there was also Subversive. It's came from Polarion but it's now a part of the Eclipse project so at first I thought that would be better. But a little research gave mixed results. There's obviously some squabbling between the two projects. Apparently Subclipse didn't join the Eclipse project due to license issuings. Subversive got around the licensing issues by not providing all the components, requiring you to separately install some parts.

The overall feeling I got from my quick research was that both plug-ins provide much the same functionality, but people seemed to have fewer problems with Subclipse. There are enough problems with both that some people recommend just using TortoiseSVN outside Eclipse. But TortoiseSVN is only available on Windows (where I do use it).

So I tried to install Subclipse. And got errors about dependencies. Sometimes I just have to shake my head at the state of our technology. This is a fresh install of Eclipse and a fresh install of Subclipse. You can't get much simpler than that. Wouldn't that be the first, most obvious test case? To be fair, maybe it's something to do with being on Mac OS X or something specific to my setup. You never know. But more research (what did we do before the internet and search engines?) showed that I wasn't the only one with this problem.

One suggested fix was to uncheck some of the optional components - that got rid of the errors.

When I had added Subclipse, it had automatically added SVNkit (from Eclipse itself). One of the optional components in Subclipse is the SVNkit adaptor. When you uncheck this, it unchecks the whole SVNkit plug-in. It appears that it's the SVNkit that "causes" the errors, not the optional Subclipse components.

The "best" part, is that when you proceed to the install, it appears that it is installing SVNkit after all - despite it being unchecked. I'm not sure what's going on, but it seems to work so I'm not going to waste any more time on it.

Here's a screen shot to illustrate:

Maybe I should be trying NetBeans. It doesn't have Antlr support, but now that I'm not using Antlr, that's not an issue. And it does have official support for Subversion!


Mark Phippard said...

You ran into a confusing aspect of the Eclipse 3.4+ installer. When you add an update site like Subclipse that has plugins that come from other update sites, it also adds those in. So in this case, the SVNKit update site was also added. However, the SVNKit plugin is also on the Subclipse update site (there is no need for any other site). If you look at your screenshot, you selected the SVNKit plugin to install from the Subclipse site.

I'd recommend you use JavaHL. There is an FAQ available for help on getting it installed:

On OSX, it is pretty simple. Just install the OSX SVN 1.5.5 package from CollabNet. It includes everything and installs it in the right way so that Eclipse sees it automatically.

andrew said...

Thanks for the prompt assistance.

I still think if you do the obvious things (at least, they seemed that way to me) then it should work.

I went to the download page, got the update url, and entered that in Eclipse. Nowhere did I see anything telling me to do anything different.

Maybe I missed something on the site, but if so, to me that just means it should be more obvious.

How about a big warning about this issue, right on the download page?

Why does it unnecessarily add the SVNkit site? Obviously you're aware it's not needed.

Why does Eclipse choke when you can get the same plugin in two place? (I realize that's not a Subclipse issue.)

Sorry to be critical, but I think we've got to quit accepting this kind of problem as "to be expected" or we'll never make progress. If the experts just say, "oh yeah, but all you had to do was ..." that doesn't help the next non-expert. Even if you publish it, it'll soon be out of date and incorrect and misleading.

I'm sure my own software has similar issues, but I hope people point them out, and I hope when they do, that I'll try to fix them.

Mark Phippard said...

Well one reason, is that we are supporting Eclipse 3.2+ This is a new behavior in 3.4. Prior to this it did not have this behavior of adding and selecting other update sites.

You did not post details about what the error was you got, so I am not really sure what it was.

We are an open source project. Feel free to submit a patch for our web pages or add some information into our wiki based on what you've experienced or learned.

andrew said...

You got me there - I should at least be submitting bug reports or adding to wikis etc. I don't know enough about how it works to submit a patch, though.

Writing about problems on my blog helps a few people who find it through search, and it does raise awareness, but it doesn't directly help the projects.