Much ado about scripting, Linux & Eclipse: card subject to change

Showing posts with label testing. Show all posts
Showing posts with label testing. Show all posts

2016-01-01

New Year's Day

Been too long since I blogged here. Time to begin again.
All is white on New Year's Day
Like a dead channel, on the TV
I want to be coding
Be coding night and day
The more things change
The more they stay the same

I will iterate again
I will iterate again

Under a neon bulb
Group of devs chatter, in @s and pings
Bugzillas logged, JIRAs are too
The blogosphere says, says 
Say it's true, it's true...
And we can break through
Though platforms too 
Many spring from one 

I... I will write some tests again
I... I will write some tests again

Oh...
Maybe the time is right
Oh... maybe tonight...

I'll debug my tests again
I'll debug my tests again

And so we're told it's the container age
Transform and deliver your apps a new way
Still I want to be coding
Be coding night and day
The more things change
The more they stay the same

2010-03-31

HOWTO: Build Plugin & Feature Projects, Then Run Their Unit Tests w/ Tycho :: GEF Example

Note that the instructions below are for Linux (or MacOSX). On Windows, your YMMV, but the process is the same.

1. Check out the entire source tree of your project from CVS, SVN, or Git into ~/build.

2. If needed, move plugins, features & test plugins into:

~/build/plugins/
~/build/features/
~/build/tests/

(Test features should go into features/ folder too.)

3. Install scala from http://www.scala-lang.org/downloads

4. Fetch genpom.scala and parent-pom.xml; save in ~/build or equivalent.

5. Tweak parent-pom.xml to suit your needs or use as-is.

6. Run this to generate pom.xml files for plugins, features, and tests:

cd ~/build/plugins/; scala ../genpom.scala
cd ~/build/features/; scala ../genpom.scala
cd ~/build/tests/; scala ../genpom.scala

7. Download Maven 3 from http://www.apache.org/dyn/closer.cgi?path=/maven/binaries/apache-maven-3.0-alpha-7-bin.tar.gz

8. Install Maven 3

sudo su; cd /opt; tar xvzf apache-maven-3.0-alpha-7-bin.tar.gz
ln -s apache-maven-3.0-alpha-7 maven3

9. For convenience, alias mvn3 to the new maven:

alias mvn3='/opt/maven3/bin/mvn 2>&1 clean install | tee buildlog.latest.txt'

10. Build the plugins, features, and finally tests:

cd ~/build/plugins/; mvn3
cd ~/build/features/; mvn3
cd ~/build/tests/; mvn3
Look in ~/build/plugins/org.eclipse.*/target/ for generated jars.
Look in ~/.m2/repository/org/eclipse/* for published jars.
To automate steps 6 and 10, you can run this script in the ~/build/ folder:
#!/bin/bash
for f in plugins/ features/ tests/; do \
  cd $f; scala ../genpom.scala; \
  /opt/maven3/bin/mvn 2>&1 clean install | tee buildlog.latest.txt; \
  cd ..; \
done

(The above blog is also posted here.)

2009-11-27

Dash Athena: More Ant, More Tests, More Repos!

  • Infrastructure Changes
  • Cross-Platform / Ease of Use
  • bug 295670 Support running JUnit tests run from Ant script instead of Bash - tests can now be run on Linux and Windows (and to a lesser extent on Mac OSX) using new testLocal build step
  • Bug Fixes
  • bug 292486 Allow builds to fail if unit tests fail using failBuildIfTestFailuresOrErrors=true
  • bug 294678 Categories don't show up with IBM 1.6 JDK - implemented workaround so a different JDK can be used for p2 operations than for compilation of sources: use PACK200_JAVA_HOME=/path/to/different/JDK
  • bug 295773 Non-incubating projects no longer need to set "incubation=" in their build.properties
  • bug 292235 Included pre-compiled binary features/plugins are now included by default using PDE's runPackager property; can disable this behaviour with packageFeaturesIncludedBinaries=false
  • Documentation
  • Testing - Different ways to run or re-run tests, including as a secondary process after a build (so they can be run on a different platform or by a different user)
p2 does not natively support remote repo zips; to workaround this the zip is fetched and the URL is rewritten from http://path/to/foo.zip to jar:file:/tmp/path/foo.zip!/

Previous New & Noteworthy | More Athena Docs

2009-05-26

Dash Athena: Eclipse Common Build System / Running Tests On Your System

Bjorn recently kvetched that Eclipse projects met two or three of those goals, but fell down on the "common build system" and "tests run on your system" [1].

While it's true I've seen a number of projects who don't have, don't run, or don't publish their tests, I'm a little disappointed to see Bjorn's no longer committed to the common build solution we've been working on since September 2006 (in earnest since June 2008). We do have a project to solve both those concerns, but like all things at Eclipse, it's powered by YOU. You want it to happen, you have to help. I'm looking for a few good contributors and committers for the Dash Athena project to supplement the great people we already have. Or, if you don't have time to contribute code, you can help by using the system, testing it, opening bugs, enhancing documentation, and blogging about it.

So, what is Dash Athena?

Well, it's a common build system using Hudson and PDE which can also be run commandline on Linux, Windows or Mac, or in Eclipse. It can produce zips of plugins, features, examples, tests, then run those tests. It can also produce update sites with p2 metadata, which can then be published to eclipse.org (or sourceforge.net, for that matter) so everyone can get your bits via Update.

Tests will currently only run on Linux - if you'd like to help us port to Mac OS X and Windows, please step up. The system works with CVS, SVN, and probably Git/Bzr/Hg too, since it supports building from locally checked-out sources and will copy your features/plugins so they're in the format that PDE requires. It supports source input via map files (soon Project Set Files (*.psf), too!) and binary inputs via zips and p2 repos / update sites.

If you aren't sure how to get started w/ an Athena build, please don't hesitate to ask. If you feel the docs are insufficient, incomplete, or inaccurate, let me know - or better - fix them! Want your own Hudson job to run your build? Just open a bug and we'll set you up.

Oh, and incidentally, the irony is not lost on me that I'm using American iconography above even though 5 of the 6 committers on the project are Canucks. :)

2009-01-30

Do you wanna be open source?



I've got a plan to make code free and open,
Lucky for me, for you it's a cause you can join,
The world is slowly changing,
FLOSS is so contagious

Chorus
I'm willing to code my way to the top,
I wanna be o-pen source,
I don't wanna stick with vendor lock-in,
I wanna be open source

I must confess,
Lin's got too many distros,
Been sleepin around,
Talk of the town,
My name is...

E-clipseCon will beckon,
E-veryone will listen,
Play my vimeo
Check me out on ohloh,
Browsin' through the source, yo
No one ever says no

Chorus

I'm willing to code my way to the top,
I'm a contributor
I'll submit patches, write docs, and test stuff
Make me a committer

My friends... are all... sans Windows
My friends... they all... pronounce the 'g'

I just fixed a bug!

Play my vimeo
Check me out on ohloh,
Browsin' through the source, yo
no one ever says no

Chorus

I'll collaborate my way to the top,
I'm a beta-tester
I'll report problems and suggest features
Help to make better software

Freedom... comes when... the source is free
Freedom... thanks to... community

Play my vimeo, check me out on ohloh
I'm willing to code my way to the top
Browsin' through the source, yo, no one ever says no
I wanna be o-pen source
x2

Are you willing to code your way to the top?
Do you want to be o-pen source?

Darren Hayes - Popular

2008-01-10

Time for M4

Ganymede M4 is out tomorrow! Get your red hots bits here (or here)!

There's no profit out in Portland but they're making up Gany
With long division and an update site
It's easy enough to be used by your granny
And it's out tomorrow night

C'mon people time to give us a hand here
You're Eclipse's working corps
(Can this be what you voted for?)

Time for M4 [x2]
Nothing like Four On The Floor
Time for M4 [x2]

It's an urgent fest of test
Declining bugs

Use the force and ya'll try it out
Th'Eclipse economy is making new jobs
You're the people who benefit most
So give a little to your benevolent hosts

Does open source steal from the rich to give to the poor?
Who cares about that - come get some M4!
And new provisioning tech to explore

Come get some 4 [x2]
Better than going to war
Come get some 4 [x2]

It's an urgent fest of test
Declining bugs

We've got to kill 'em and close 'em
Before the API freeze
Squash some bad bugs
Let 'em bleed from their knees
Give a few dollars to the people who sweat
Source is open or closed - which would you rather get?

At a job site the boss is god like
Conditioned workhorses code into the night
Seasoned vets with their feet in nets
A stones throw away from a cock fight
But not tonight: feed a patch

You'd like another add-on? (feed a patch)
Cause it's the finest in the nation? (feed a patch)
Well there's no time left to add that
When it's scope creep or it's plan

Install M4 [x2]
Better'n releases of yore
Install M4 [x2]

It's an urgent fest of test

Bad Religion - Let Them Eat War

2007-11-17

M & 3s

You and I should get away for a while
I just want to be alone with your smile
Download some features and plugins to update the IDE
We'll blast the stereo and we'll build with PDE

Because when I'm with you there's nothing I couldn't do
I just want to be your only fool
I'm grasping out at straws thinking back to what I saw
That night I tried to use that other tool

IRC was getting so bland
There are only so many ways to type '~faq' with one hand
Sometimes it makes me want to laugh
Sometimes I want to take the toaster in the bath

Because when we're with you there's nothing we couldn't do
And now it's time to share that love
We all oughta be testin' out Gany M3
Cuz there's no free help coming down from above

Who wants to live the bleeding edge?
I want to to live the bleeding edge.
Are you going to help testin'
Or are you assuming it'll work out in the end?

Blink 182 - M & Ms

2007-09-27

Fashion vs. Function

I've been thinking about the "new" UI Best Practices Working Group, and specifically what that means for next June's Ganymede release.

Leaving the debate about scope creep aside, I'm a big supporter of "usability-centric design" or "user-centered design" or "outside-in design" or whatever the buzz you want to call it. Here's my take:

Should we enforce a "make it useable" theme for Ganymede? That's not really policeable, I know, but if everyone buys in to the idea, it means we're all working with usability in mind (or "consumability" of you prefer that term).

I know for me personally, the first pass at a piece of code is often the 'function' side, not the 'fashion' side (making it pretty or making it usable by anyone other than me), but the fact is a chunk of code is only as useful as its adoption by users. The second pass is 'let someone try it out' and then 'document how it works, if it's not already obvious.' Documentation SHOULD be something you don't need to do often, because realistically, no one (or maybe that's just me?) RTFM's the first time they try something out. Tools should be (in theory) easy enough to grasp the gist without having to grab for the manual. And if installing said tool requires grabbing a manual or FAQ, well, there's a problem there too.

You can build a super efficient car with a useless dashboard and ugly paint job and it won't sell. Make it usable (and sexy!), and it'll sell.

The added problem, again using my own work as an example, is that what's "usable" for me is not what's usable for my users (the Modeling project java developers). The great thing about that fact is that it forces me to design for people who don't want to have to work/think like I do. No one wants to use lengthy shell script commands to run or promote a build, but they're happy to click a few buttons on a website. No one wants to have to update properties or map files by hand, but they're happy to use a web-based generator that takes point-and-click input and turns it into data the build can use. No one wants to input arcane mysql queries at our release notes database, but they're happy to use the output of those queries, again, via a clean web UI. And because I'm inherently lazy and hate doing the same crap over and over, I'm compelled to find ways to make tools more consumable for me, too, so I can move on to solving the next problem.

Taking this example inside Eclipse to the plugins & projects that make up Eclipse / Europa / Ganymede, what this simply means is: 'assume your users don't want to know how the crap under the covers works'. Make it easy. Use it yourself. Try it out. If it annoys you (and you built it) it'll annoy people who didn't build it and don't have control over fixing it.

If you don't know what your users want, and can't think like them... it's time for the time-honored tradition used in many successful first dates: ask them. Let them talk about themselves, their wants, their desires, their pains. Answer their newsgroup questions. Chat with them on IRC. Watch for patterns.

Anyway, long rant aside, my point is simply this: never stop asking yourself if what you're building will be useful for your users, and if it balances function with fashion enough that there will be buy-in. Because if you build it, they will come... but if you build it badly, they won't stay.

2007-08-27

Notes 8: Part 3: M'aidez!

After much digging and hacking I've found a number of places to go for help with the newest Notes offering. That's the good news. Usability score: +1

The bad news is that if you're like me and used to tracking bugs a la Eclipse Bugzilla or Sourceforge, you will be sorely disappointed with the options for bug reporting for Notes 8. Usability score: -1

I hate to bite the Big Blue hand that feeds, but there are much more efficient tools & processes to manage software development than the use of a discussion forum. Sure, it's a case of eating your own cooking +1, but I've used lots of Notes databases in my 8 years with IBM that were more user-friendly than this -1. Why is using Bugzilla (or sourceforge's tracker) such a big deal?

Well, for one thing, they're transparent, open source systems. For another, using a system like Bugzilla provides consistency across dev teams. Notes 8 is proudly 'built on Eclipse' +1 but hasn't adopted the Eclipse Way yet for issue tracking, so developers that work both sides of the fence (like myself) have to learn more than one system and in some cases, report issues in more than one place -1. So much for the mantra of 'do more with less'.

Anyway, here's a couple places to go for help, which it turns out are all linked from within Notes 8 itself under the Help menu (unless you're on the Getting Started page or a web browser tab, in which case they magically disappear) +1 -1.

  • Notes/Domino 8 Support Forum

    Well trafficked, but a bit of a pain to use -- cannot attach screenshots or log files without the use of some free service like imagebin.ca or pastebin.ca; cannot view an entire expanded thread in one page; follow-ups may be posted anonymously (as far as company name goes, anyway) so there's no enforced accountability; 4 different ways to search for my posts (only two produce results, albeit differently) +1 -4

  • Product Feedback Form

    This form proudly states "We value and review all comments, but cannot respond directly to them." +1 -1

Here's a few handy blogs +3:

Now, just in case it's perceived that I'm actively trying to embarrass or offend, I'm not. Let me clarify:

  • I blog to talk about things I like and things that bug me, with hopefully some balance between the two. By showing the things that bug me, it's my hope that those annoyances will be fixed, or that someone will share a hack / workaround, or prove me wrong. By talking about the things I like, I hope to encourage others to try those technologies or use a hack I've worked out. I'm a tester by nature, and I want software to work well. Think of me as the Penny Arcade of usability nerds, without the advertising, merch, comics, and clever dialogue. Oh, and the shipments of free software. And the write-ups in Wired. And 7-figure income. Yep, just like 'em.
  • I've signed up to be a Usability Tester for Lotus. Time will tell what that means.
  • And, as it's better than a boot to the head, I plan to hang out in the forum and try to help out as best I can. Of course this will also yield some of my own bug reports discussion topics from time to time, but it's all about balance.

As always, the contents of this site are my own and don't necessarily represent IBM's positions, strategies or opinions.

2007-07-12

Real World Bug Reporting

I've seen some kvetching lately in #eclipse that people (Eclipse users/customers) open bugs which never get resolved. Also, last night I saw an article from earlier this year discussing whether or not Vista would be fit for purpose, which spawned further kvetching about Microsoft and IBM and how much/little support there is from large organizations with large customer bases.

That said, let me present a real life example I just went through of how much worse life would be in OSS if we, the developers, treated our customers (the world at large) as if we were a monopoly with nothing to gain from helping you out, with an insipid insistence in NOT working together as a community.

Without further ado, I give you ... reporting a bug to Rogers Communications (unabridged).

 Original Message Follows:
 ------------------------
 name: Nick Boldt
 emailId: nickboldt
 replyEmail: nickboldt@gmail.com
 issue: account
 subcategory: other
 problemdescription: Logging in using Firefox or Konqueror browser
 (which normally works), I periodically get this error:

 Microsoft VBScript compilation  error '800a03e9'

 Out of memory

 /web_auth/verifpwd.asp, line 0

 Given you're running a Microsoft server -- maybe it's in need of a
 reboot? ;-)
Dear Nick Boldt,

Thank you for your email.

We understand your concern with this issue.

Rogers Yahoo! Hi-Speed Internet technical support representatives are qualified to diagnose and troubleshoot issues relating directly to our client software. We will therefore not be able to assist you with this matter, as it is beyond the scope of our support parameters.

For assistance regarding peripheral devices and other software products, we recommend contacting the vendor of the software in question. We apologize for any inconvenience.

If you have any further questions or comments regarding our service, please fill out the online form on our Customer Support page listed below or contact us by phone at 1-888-288-4663.

Regards,
name removed

There's nothing more annoying that people who tell you to solve your problem by repeating what you've already done (namely, to contact the software vendor, who in this case is in fact Rogers).

Guys, this is either one of two problems:

a) your webserver has a memory leak

b) your website relies on activeX controls and therefore doesn't (consistently) work with anything but Internet Explorer

In either case, it has nothing to do with my "client software" -- it's a website/webserver problem.

Please escalate this to your webmaster for review.

Cheers,

Nick

Granted, I was wrong about what the problem here was, but that's why I was suggesting escalation. Besides, I don't do ASP anymore.

Thank you for taking the time to write to us, we appreciate your use of online customer service.

We would be more that happy to assist you with your concerns.

We appreciate hearing from our customers and thank you for your comments and feedback. However, please note that the Rogers Yahoo! Hi-Speed cable internet service, currently supports only Internet Explorer and the Rogers Yahoo! browser. We apologize for the inconvenience.

Please let us know if we may be of further assistance to you.

If you have any further questions or comments regarding our service, please fill out the online form on our Customer Support page listed below or contact us by phone at 1-888-288-4663.

Regards,
name removed

I think the point you're (once again) missing is that it's not the browser (client) that's the problem but the website/webserver (server). Since this problem is intermittent and happens with multiple different browsers, I'm reasonably certain it's not a browser issue.

Further, since VBScript compilation occurs ON THE SERVER, not in the client browser (we're not talking about Javascript or another client-side scripting language, but a server-side one), and since my computer (and thus browsers) have ample memory to load other websites (2G of RAM and a 2G swap) an "Out of memory" error must be caused by a problem ON THE SERVER.

A quick Google search confirms that this is a known problem in VBScript, with an available workaround provided by Microsoft:

Microsoft VBScript compilation error 800a03e9 Out of memory
http://support.microsoft.com/kb/174634

That said, if you don't feel this issue needs to be escalated to your web server support staff for review, or that it's perfectly reasonable to expect that at least once a day your website won't let customers sign in (it worked fine a moment ago but not when I first filed this bug report), then by all means, please send me another FOAD "we only support MSIE" note. After all, it's much more fun (and costly for you!) for me to call your support staff instead of using the website for self-service every time it won't let me log in.

Yours,

Nick

Dear Nick Boldt,

Thank you for your email.

We sympathize with your situation.

Please provide further information on the nature of the problem you are experiencing and we will be happy to assist you in any way we can. Information such as error messages or codes you receive may be helpful in determining the source of the problem.

Please include when you are recieiving the error message as well, including the full URL of the site and any other information you can provide about it, may be useful as well.

If you have any further questions or comments regarding our service, please fill out the online form on our Customer Support page listed below or contact us by phone at 1-888-288-4663.

Regards,
name removed

Fine, if you need me to do your job for you, I will.

Steps to reproduce:

1) Go to http://www.shoprogers.com/homeen.asp?CustomerType=Consumer&Language=En

2) Enter username / password; check box for 'Rember my username'; click go or hit enter

3) Marvel at the following error which tends to occur at random intervals but particularly the second or third time I try to log in using the same browser session:

Microsoft VBScript compilation error \'800a03e9\'

Out of memory

/web_auth/verifpwd.asp, line 0

4) Per advice in http://support.microsoft.com/kb/174634, fix this bug.

5) Send me a $50 account credit for helping you fix your website. (Hey, I can dream.)

Cheers,

Nick

Dear Nick Boldt,

Thank you for taking the time to write to us, we appreciate your use of online customer service.

We would be more that happy to assist you with your concerns.

Although we thank you for your input regarding the Corporate Website, for further issues related to the Customer Service feature, we recommend contacting the support number 1-877-343-5745. They may then escalate such matters to the network administrators, who manage the server.

Please note that the email support team, addresses issues related to the various Rogers Cable services (such as Hi-Speed cable internet, Home Phone, Digital Cable TV, etc.).

If you have any further questions or comments regarding our service, please fill out the online form on our Customer Support page listed below or contact us by phone at 1-888-288-4663.

Regards,
name removed

1. It's not the Corporate Website, it's the public customer website. I'm not a corporate user, I'm just one of your many regular customers. I would have thought that would be obious from the URL: http://www.shoprogers.com/homeen.asp?CustomerType=Consumer&Language=En -- note the "CustomerType=Consumer" part.

2. Why should I have to report this issue a second time to yet another unsympathetic ear when you can just forward this email chain to the appropriate people for resolution? Not only do you need me to document (twice) the problem, but you now want me to report it twice as well? Are your webmaster(s) so afraid of email that they need a buffer of phone-answering lackeys around them to protect them from valid, documented, and solvable bug reports?

3. If your staff "addresses issues related to the various Rogers Cable services", then why can't you deal with issues related to me checking my Rogers bill online -- namely, the fact that about half the time I try to log in, I get the aforementioned error? Shouldn't supporting the website on which my bills reside be part of supporting Rogers Cable services?

Thanks,

Nick

Dear Nick,

Thank you for contacting us again, we appreciate the support you are providing us.

I have read the history behind your e-mail requests along with your current e-mail. First I would like to mention that the Rogers corporate web site is www.rogers.com. I'm sorry if that information was confusing to you.

Second, my question to you is why are you logging in 2-3 times in the same session? (from e-mail sent 7/11) You only need to log on once to do all your maintenance, bill viewing and reviewing of your account. This may be the root cause of the problem.

Third, you need to call the staff in our Internet support office. We are not qualified to help you. We do not do any technical troubleshooting via e-mail. Please understand that we are not equipped with this type of knowledge, we answer a limited range of questions about billing, sales, general inquiries. Please call 1-888-288-4663, they are available 24 hours a day, 7 days a week, and would be very happy and able to help you.

Thank you for contacting us, we hope that this issue will be resolved by our technicians.

Sincerely,
name removed

So, the moral here is that even when you provide steps to reproduce, solve the already-documented problem (via Google and the Microsoft KB), and request multiple times that they simply forward the email chain to someone who can address it, the oh-so-diligent lackeys at Rogers' email support desk refuse to help while claiming they're "happy to assist." Yeah, right.

Contrast that with the 1000s of bugs closed this year for Europa, and I'm sure you'll agree Open Source is much better than dealing with the close-source, closed-process, closed-access monopolies. Not only do we have several documented way to ask for support (bugzilla, newsgroups, mailing lists, IRC), but we actually use them, and the projects & member companies share information and collaborate to solve issues. Oh, and all this without having to pay $100+/mo for "service."

Really, what more could you want?

2007-06-19

I did it all for the cookie...

No, seriously, I don't test for schwag, or for the cookie, though some muppets do. I test because I like to work on and with tools, sites, projects, frameworks... that just work, without jumping through hoops or needing to recite black magic incantations. (Which doesn't mean I won't accept schwag if people want to send it to me. So far the best schwag-like mail I've gotten has been a clown nose from Kim, but that's another story.)

Anyway, inspired by Ian's bad experiences today with Europa, I thought I'd try to reproduce them. I couldn't, but I got something IMHO worse. While there's ways to work around the problems I hit, the issue here is Newbie Usability. I've been hacking w/ Eclipse for 4 years. The point of Europa is to be easy to use for the first-timers, who don't know about things like the eclipse.ini file (I've never looked at that file until today) or any/all of the OSGi startup flags you can use.

So, to synthesize the Newbie experience further, I googled for "-Dosgi" and searched the Eclipse wiki, but the best I could find is passing mention of these flags in some 145 Eclipse bugs. Another usability issue, IMHO -- insufficiently quick-findable documentation.

Oh, wait, I think (while still wearing the Newbie hat), what about help.eclipse.org? Sure enough, it's documented as Eclipse runtime options. OK, that's cool, and that also means if I installed the SDK I have those docs in my Europa install, but if the problem is starting Europa in the first place, I still have to go hunting outside the Eclipse Help system. At least I've found what I wanted.

Back to the original problem... installing 121 out of 122 Europa features and watching as my Eclipse install crashes and burns on the first startup. Not cool. Second startup is better, but has problems on shutdown. Third time's the charm, apparently.

This whole experience brings to mind five, no, three questions, which I'll pose here and cross-post to the cross-project-issues-dev list too.

  1. Should the Buckminster SVN support be contributed to Europa, or should it ONLY be on Buckmister's own Discovery or Update site, in order to avoid a config problem right out of the box? I'd suggest it should not be in Europa because of the negative perception it might cause both Europa overall and Buckminster in particular. It portrays two issues: (i) the full suite (122 features) doesn't work 100% out of the box, and (if you'll forgive the rather damning phrase), (ii) "it's all Buckminster's fault". I don't mean to offend the good folks on the Buckminster team, only to suggest what *some* might say, and how to avoid that perception from ever being voiced anywhere but this rant. ;-)
  2. Since those who want SVN support need to add another Update site anyway (or install SVN features manually some other way), is it so onerous to ask those people to jump thru one extra hoop and remove the hoop from everyone else who doesn't need/want SVN?
  3. Who in their right mind will need to install 121 features (451M) on day one of their Europa experience? I, for example, only really need about 75M of features on a regular basis (EMF, XSD, Mylyn, phpeclipse, PDE, JDT, CVS) on top of the base 40M platform (68M unpacked).

I agree with Michael Scharf (who, incidentally, was the only person who could follow instructions) that Eclipse can be compared to ketchup in that it's:

[U]sed everywhere. It often does not fit. ... It comes in massive amounts (like the 18 million lines of code of the Europa release). It's often hard not to use it.

But that said, I don't think installing Europa should be harder than banging on the bottle to shake the last dregs of ketchup down the neck and onto my fries. It's hard *not* to use Eclipse, true, but should it be this hard to *use* it too?

2007-06-12

That Ol' PDE Black Magic

... or more reasons why features still suck.

In the past 24hrs, I've encountered two feature-related PDE issues, which I think warrant discussion as they are, to the uninitiated, seemingly black magic. The first of these was discovered and fixed last night while watching The Dresden Files in ten-minute chunks while waiting for builds to complete, but I'm sure that's just a coincidence.

Bug The Firste: feature.xml should not specify version numbers when including required plugins like org.eclipse.test [192231].

This issue manifests when your build stops working one day and complains, "eclipse/test.assembly/eclipse/plugins/${org.eclipse.test} not found." The fix is simple: make sure you set version="0.0.0" in your feature.xml when including org.eclipse.test or other plugins referenced in your map file and required by your build. See also Build Problems.

Bug The Seconde: PDE will build features in the order they're listed in feature.xml [192292].

This issue manifests when your source feature, for example, builds OK but contains no source because PDE is building it BEFORE your runtime feature(s). Once again, the fix is simple. You just have to reorder your feature.xml to put your source feature(s) last.

Bug The Thirde (Bonus Bug!): If your plugin or feature doesn't have the right Nature and Builder in its .project file, it won't behave the way you'd expect [192247] in Eclipse.

This one's a no-brainer, but also a handy tip when working with PDE. If your plugin project doesn't have the Plugin nature, you can't open a MANIFEST.MF file with the Manifest Editor; if your feature doesn't have the Feature nature, PDE won't give you warnings/errors if your feature is misconfigured (eg., if you have a version set to "o.o.o" instead of "0.0.0"). Just add something like this:

<buildSpec>
  <buildCommand>
    <name>org.eclipse.pde.FeatureBuilder</name>
    <arguments/>
  </buildCommand>
</buildSpec>
<natures>
  <nature>org.eclipse.pde.FeatureNature</nature>
</natures>

2007-06-04

Managing Plugins and Features with Link Files and Extension Locations

After loitering and latering (but no lootering!) in IRC for a few hours today, I've come to the conclusion that not enough people know about .link files. I guess I could wiki this, but I thought I'd blog it instead.

Scenario 1: You're an Eclipse user. You use Eclipse a lot. In fact, you use multiple versions of Eclipse for testing, debugging, and even *gasp* developing. You waste a ton of time unpacking zips and running Update Manager.

Scenario 2: You use Eclipse and occasionally do something silly like deleting files outside of Eclipse or updating CVS files using commandline CVS instead of the click-click-wait method in Eclipse. (This is usually not a problem, but can sometimes lead to ...)

Scenario 3: Something Wicked This Way [Came] and your Eclipse has become corrupt. It's time to blow away your config files, .metadata files, or run with -clean. If that doesn't work you probably have to reinstall (oh crap) everything -- Eclipse + all your trusty plugins. You could also copy carefully from the busted Eclipse to the minty-fresh one, but that's both time consuming and possibly dangerous. Is there a better way?

Scenario 4: You produce a product based on Eclipse but want to keep your stuff and Eclipse's stuff separate when you bundle it all up for easier digestion by your users. Maybe for license reasons, maybe for legal reasons, maybe just for file system hygiene or to make support easier.

Scenario 5: You're a control freak and just like to keep stuff in different places according to your own particular... um... idiom.

In all of these scenarios, .link files can help. Here's how to set one up:

  1. In your Eclipse install folder, create a links/ folder next to features/ and plugins/.
  2. In your eclipse/links/ folder, create a textfile called whatever.link. This file need only be one line, with newline and no trailing slash(es), and can be called anything ending with .link.
    path=/home/nickb/eclipse/eclipse-plugins-phpeclipse
    -or-
    path=D:/eclipse/eclipse-plugins-phpeclipse
    -or-
    path=D:\\eclipse\\eclipse-plugins-phpeclipse
  3. Unpack a zip full of plugins and features into the path specified in your .link file.
    /home/nickb/eclipse/eclipse-plugins-phpeclipse/
        eclipse/
            plugins/
            features/
  4. Start up Eclipse. Check Help > About to see if all your plugins and features are listed.
  5. Rinse, lather, repeat.

You can have lots of .link files and lots of install locations, which allows you to easily swap between different versions of plugins and features for testing purposes, or to share an install location between multiple Eclipse installs. And, when you upgrade Eclipse, you can just copy the old links/ folder into the new Eclipse and voom, all your old plugins and features are there. Please note that when changing between versions of Eclipse, sometimes things will end up disabled, if the new Eclipse won't work with the old plugins. If this happens, you can easily switch back to the old one, look for an update, or download a new zip.

You can also manage your plugins inside Eclipse. So, if you prefer clicking to typing, you can convert a .link file location into a Update Manager (UM) install location, so that you can use UM to install updates to plugins that you created by unpacking a zip, or just to reuse an existing folder for later UM installs. Here's how:

  1. Complete steps above. Verify all your plugins & features are properly available in Eclipse.
  2. To convert a linked folder to an "Extension Location" as used by Update Manager, you just have to put a single file in the eclipse/ folder inside the linked folder. Here's a sample:
    $ cat /home/nickb/eclipse/eclipse-plugins-europa/eclipse/.eclipseextension
    id=org.eclipse.platform
    name=Eclipse Platform
    version=3.3.0
  3. Remove or rename the .link file that references the folder you just converted so that you're not trying to add the same plugins twice.
  4. Start up Eclipse. Check Help > About to make sure you no longer have the plugins & features you just disabled. Then launch Help > Software Updates > Manage Configuration > Add an Extension Location to re-add those plugins & features.
  5. Restart Eclipse.