[foreign] RFR 8208199: Revisit one interface per header file approach

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Aug 3 16:26:39 UTC 2018


I agree we need something to treat 'related' header files in a more 
cohesive fashion.

I've also recently stumbled onto a similar issue with the clang Index.h 
header, which is importing few associated header such as CXString.h - 
defining types which virtually ought to belong to the same namespace.

That said, I'm not sure using inheritance is the best way to provide 
such coupling. An alternative would be, for instance, to simply 
recursively add external header definitions into the main header (the 
one importing them). For some reason, something like this would seem 
more in spirit with C - where importing an header really amounts at 
adding the imported definitions on the importee.

I also think that we should provide some mechanism to control this 
merging behavior; privately I've suggested an option 'follow-includes' 
which takes a path (or a list of paths), and which allows to follow 
headers onto specific folders. An option like this would be useful to 
deal with what Henry set out to do yesterday - e.g. allow jextract to 
recursively process headers in system libraries.

So, in conclusion, I'm not opposed with the effort, but I'm not sure we 
have found the right stacking yet.

Maurizio


On 03/08/18 15:07, Sundararajan Athijegannathan wrote:
> Please review.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8208199
> Webrev: http://cr.openjdk.java.net/~sundar/8208199/webrev.00/index.html
>
> Thanks,
> -Sundar



More information about the panama-dev mailing list