At 01:46 PM 3/19/2001 +0000, Nic Ferrier wrote:
[snip
>
>I've been considering adding "compile master" support to the
>compiler. Specifically I thought one could specify a java class as a
>source file producer, eg:
>
> javac -cp classes.jar -d destdir -producer MakeSources.class
>
>The compiler calls the producer class (which conforms to some simple
>interface) with it's current compilation environment (destination dir,
>classpath, etc...) and the producer class passes the text of the
>source files that need recompilation. The compiler can then compile
>those source files.
>
>This has similar advantages to your system but also:
>
>- the source code could come from anywehere (a JSP engine for
>example)
>- modular classes could be used
>
>The disadvantage is that it needs a compiler change to work. I could
>quite happily change kopi but probably not jikes or javac.
>
javac is just a native wrapper around the JDK compiler. My plan has been to
provide the JDE with a compile server of its own that would be started once
per session, perhaps in the beanshell. This would avoid the need to launch
a vm for every class to be compiled. It would be natural to add compile
master support for the JDE's java compiler.
>
>The main thing I don't like about your proposal is that your talking
>about having a class in every project subdir.
>
>Why can't an interface be designed that will work across many
>subdirs? If you want a sort of make system could you not allow users
>to define a single class with methods with names that reflect
>directory names. A core class method would then call the correct
>methods for each directory (using introspection).
>
There is no reason there has to be a compile master in every directory. It
just so happens that my initial prototype works that way because it was
easy to implement recursively. I have been thinking about creating a single
compile master per project and probably will end up doing so, eventually,
if not in the initial public release.
[snip]
>
>Wanna put heads together?
Yes, that's why I asked for input.
Thanks,
Paul