• Share this article:

What’s in a Namespace?

Monday, September 16, 2013 - 17:09 by Wayne Beaton

Bug 331397 suggests that we should add a little something about project namespaces into the Eclipse Development Process (EDP). In my mind, there are at least a couple of problems with this: I’d really like to avoid adding anything to the EDP; and we stopped being a Java/OSGi exclusive club a long time ago.

Why yes, I have been Beaton all my life. And so has my son.

Why yes, I have been Beaton all my life. And so has my son.

We’ve been all about reducing barriers to participation for the past while, so my mindset with the 2014 revision of the EDP is to remove rather than add things. Still, I think that it’s reasonable to assert that restrictions on namespace use have existed for a while, so this really isn’t anything new. At least in the Java space, it’s well-understood that Eclipse projects use the org.eclipse.<short-name>.* pattern for all their Java packages and OSGi bundles. There are a few exceptions (the Eclipse Platform being the most notable example), but most projects stick to this pattern.

This, of course, leads to the other issue. What do we do about namespaces in other languages? The EDP should be language-agnostic, so baking in Java-specific rules makes no sense. The best that I’ve been able to come up as an addition to the EDP is to add the following to section 4.2 “Code and Releases”:

“Project source code must be organized in namespaces assigned to the project by the EMO.”

With Bug 413588, I’ve started a conversation around creating a namespace policy document with sections providing guidance for specific languages. I believe that I’ve captured reasonable guidance for Java packages and OSGi Bundles, but I’ve left big a to-be-done in place for JavaScript and a big void for other languages. This is, I believe, an excellent opportunity for those projects that are first to the party to shape the direction that this takes. Assuming that the notion of namespaces even makes sense for a particular language.

As always, I welcome your input. Please direct it to the noted bugs (or open new ones).