jextract fails to compile generated source

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Jun 29 18:16:39 UTC 2020


On 29/06/2020 18:28, Ty Young wrote:
>
> On 6/29/20 10:59 AM, Maurizio Cimadamore wrote:
>>
>> On 29/06/2020 16:36, Ty Young wrote:
>>> Will there be the ability to dump layout information to a file added 
>>> anytime soon? I understand plugins are a thing, but I really feel 
>>> like there is a good use case where people just want to get layout 
>>> information and nothing else and it should be supported by default. 
>>
>> https://gist.github.com/mcimadamore/5f002d8177e05780f068dd7874a5020b
>>
>> (this was shared few weeks ago).
>>
>> Yes, plugins _are_ a thing and I think it would be more constructive 
>> to try and understand what the jextract _API_ can do in order for you 
>> to generate the code the way you like it, rather than trying to 
>> convince us that "the way you like it" should be "The Way (TM)".
>
>
> Generating layout information is something jextract has to do for 
> binding generation and it doesn't conflict with jextract's core 
> functionality anymore than just dumping source code. I don't know 
> where this is coming from. This is a mischaracterization of what was 
> being asked.

I don't think I'm mischaracterizing - just describing what's going on in 
this thread.

You keep coming back to the 1000+ completions in the IDE. For the 
libraries I've used that's never been an issue (and I tend to use biggie 
libraries for testing , like OpenGL). Even in your case, after filtering 
all I get is functions which start with either NV or XCONFIG, which defo 
belong to the "library" you want to work with. If you used an IDE like 
vscode and programmed in C directly with some autocompletion support, 
you'd get exactly the same completion suggestions... because in C all 
the stuff you import ends up in the same bucket.

If you want to bucketize the output in some other manner, the API is 
there for that. What I'd like to do is to move the discussion from "but 
I'd like the default to be XYZ" to "how do I get the behavior I want?"

I'd like you to realize that choices like these are entirely subjective 
and you are entering the *creative* territory - jextract simply doesn't 
want to get in the way with "stylistic choices" such as these; these are 
best left to API developers.

Maurizio



More information about the panama-dev mailing list