AspectJTM Compiler and Core Tools

Source Code Release

Version 1.0.6 released on July 24, 2002.

 

There are two philosophies in the Open Source community about when to do the first Open Source release of a system. One philosophy says "release early and release often". The current AspectJ source code release is based on that philosophy. This approach has the wonderful property of offering no excuses for delaying a release until things are "just right" which can often mean never releasing the source code at all.

The other philosophy says that you shouldn't make an Open Source release until the sources are relatively clean, and the core design of the system is relatively stable. This approach makes it much easier for outside developers to make significant contributions to the project. We believe that clean sources and a stable design is an admirable goal for any software project, but we don't want to delay making an Open Source release of AspectJ until we reach that point.

Instead we're just going to include this warning:

AspectJ is a new kind of programming language, and our understanding of how best to design a compiler for it is rapidly evolving. We plan to continually improve and frequently redesign the compiler as our understanding of AOP improves.  We expect that the class hierarchies, method names, and fundamental design of the whole system will be significantly changing on a monthly or even weekly basis. No effort whatsoever will be spent at this point in the project to make new versions of the compiler even vaguely resemble a previous release in terms of internal design (Note: we will spend considerable effort to ensure that the compiler will behave in a consistent fashion externally to users of previous versions).

We expect this period of rapid development to end at some point. We'll be sure to announce it very clearly when we think the basic internal structure of the compiler is relatively stable and we believe it would be a reasonable platform for outside developers to look at and contribute to.  Until we make that announcement, well, you've been warned.

So, given that warning, what good is the Open Source release?

  1. Knowing that the compiler for AspectJ will be Open Source when we get to version 1.0 is important.  Building a significant system using a brand new emerging language is daring enough.  Doing this without the knowledge that the source code is publicly available is too much to ask of many people.  For this purpose, a promise to release AspectJ as Open Source as soon as we got to version 1.0 might be good enough; however, an actual release is always better than a promise.
  2. If people want to help us fix bugs, we certainly won't object.  This can be valuable to our users in allowing them to fix some of their own bugs immediately rather than waiting for us to make a new release.  It can also be valuable to us if people choose to include bug fixes with their bug reports.
  3. The code is out there.  If you're doing a throw-away research project, then it might be useful even with our dire warnings about radical refactorings.  If your project can afford to pick a single release of the source code to build on top of and not worry about keeping up with our bug fixes and improvements then the source code could be valuable to you even in its current rapidly changing state.

 

If after all of the above you still want to build the compiler from sources, here's how you do it.  The instructions below assume that you've opened some sort of shell and are sitting in the src directory.

The first step is to build the runtime support classes needed by the compiler:

> javac org/aspectj/runtime/*.java org/aspectj/runtime/internal/*.java org/aspectj/runtime/reflect/*.java org/aspectj/lang/*.java org/aspectj/lang/reflect/*.java

Then build the compiler itself:

> javac org/aspectj/tools/ajc/Main.java

To use the "AspectJ Browser", compile the following file:

> javac org/aspectj/tools/ajbrowser/Main.java 

To use the Emacs IDE extensions for ajc, also compile their symbol manager:

> javac org/aspectj/tools/ide/StringBasedSymbolManager.java

Do similar commands to compile ajdoc or ajdb, but put on the classpath {J2SE}/lib/tools.jar. (Ajdoc requires 1.3 (not 1.2 or 1.4); ajdb should work with any Java 2 tools.jar.)

If you're the kind of person who likes the notion of compiling compilers with themselves, then you might prefer instead to use ajc:

> ajc -argfile compiler.lst
> ajc -argfile ajbrowser.lst

Of course, this particular compilation method might be difficult the first time around...