Self-describing sources: the JavaC patch

Paul Sandoz paul.sandoz at oracle.com
Tue Jul 3 05:45:23 PDT 2012


Hi,

It surprised me too [*]:

  http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/javac.html#commandlineargfile

I suppose a motivation for this feature was command line length limitations. 


On Jun 26, 2012, at 11:14 AM, Jaroslav Tulach wrote:

> Hello guys.
> We had a discussion with Paul recently trying to find a way to have a form of 
> self-describing sources and not to compromise ''module-info.java'' purity.
> 
> Here is a proposal 
> http://wiki.netbeans.org/JavacOptionsInSourceFiles
> that modifies JavaC a bit and seems to fulfil many of the needs IDEs have[1].
> 
> What can stop us from changing JavaC to perform
> 
> $ javac @source-info.cfg
> 
> by default? Using this format for OpenJDK sources itself?


> Changing other CLI 
> tools jar, jmod to extract information from the same configuration file?

Would it be fair to say the logical progression is towards a project description configuration? 

I don't see how the NetBeans goal of 100% parity with a headless build could be achieved otherwise.

How would NetBeans differentiate between source and test source? Or differentiate between building a modular jar or a jmod file?

There needs to be an orchestrating meta-tool and configuration, and if such a meta-tool exists then is there any point in each tool processing the configuration file? since the meta-tool can tell the other tools what to do.

Paul.

[*] I was browsing the ant source recently and noticed that javac support on VMS requires that a special options file is created, but not using the supported command line file arg.




More information about the jigsaw-dev mailing list