Wednesday, December 17, 2008

Why Source Bundles?

I came across a question in Bugzilla on why providing source bundles is one of the "must do" items for the Galileo Simultaneous Release ? How do our clients benefit from it? It would be a nice motivating question to have answered.

The Eclipse platform went to source bundles in Eclipse 3.4 / Ganymede. The PDE build has documentation in place and it is supposed to be a "trivial" item for projects to adopt.

The benefit is that it helps to solve the long pathname limit issue on windows. In the Microsoft API (with some exceptions), the maximum length for a path is MAX_PATH, which is defined as 260 characters.

As an example, In Ganymede, there exists the source folder
[eclipse]\plugins\org.eclipse.draw2d.source_3.4.0.v20080115-33-7w3119163_\src\org.eclipse.draw2d_3.4.0.v20080529\src.zip . Because of the path length limit, "C:\Program File\Some Vendor\Some Product\eclipse" may not be an option to install your Eclipse based application that includes GEF source. At worst, the length of "Some
Vendor\Some Product\eclipse" is significantly limited.

By adopting source bundles, the path is reduced to \plugins\org.eclipse.draw2d.source_3.4.0.v20080529.jar , a significant reduction in path length for Galileo.

6 comments:

David Carver said...

So what happens if your Jar Name becomes greater than 260 characters. :)

Anthony Hunter said...

Windows will not let you create a Jar file with a name that long.

Antoine Toulmé said...

Hey Anthony, a couple of comments:
1. PDEBuild works great for projects on CVS. I don't think it works that well with projects hosted on SVN.
In any case, Oisin had to hack with Buckminster to make our stuff work.

2. Since the build is made on a linux machine, the path is not limited to to 260 characters.

lemmi42 said...

Hey Antoine, PDEBuild works for SVN too. See SVN-PDE-Build.

Ed Merks said...

The example is shorter than plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20080731-1700/launcher.win32.win32.x86.properties which is shorter than plugins/org.eclipse.ui.intro.universal_3.2.300.v20081020/themes/circles/graphics/icons/ctool/webresources_tophov.gif. The only path length problem I've ever seen is some files in UML that had disgustingly long names and didn't even belong in the build in the first place...

Unknown said...

In 3.4, generating old style vs new individual source bundles was managed by the single top level property which affected the entire build. Starting in 3.5M4, this can now be managed on a per-feature basis, see bug 230870.