jextract warnings

Jonathan Rosenne jr at qsm.co.il
Wed May 15 13:37:54 UTC 2024


Dear Maurizio,

I guessed so.

I have no experience with open source and PR, but would not object to learn. Never too late. Point me to some spec.

Best Regards,

Jonathan Rosenne

From: Maurizio Cimadamore <maurizio.cimadamore at oracle.com>
Sent: Wednesday, May 15, 2024 4:18 PM
To: Jonathan Rosenne <jr at qsm.co.il>; jextract-dev at openjdk.org
Subject: Re: jextract warnings


Hi Jonathan,
it would be relatively easy to fix the first two. Harder to fix the latter, given jextract uses a canned set of imports for all files it generates.

I'm happy to help if you want to contribute a PR. The classes generating the output are called XYZBuilder. E.g. structs are generated by StructBuilder class, so it should be easy to find what you are looking for.

Cheers
Maurizio
On 15/05/2024 14:13, Jonathan Rosenne wrote:
Intellij IDEA reports several warnings with the code generated by jextract. How difficult would it be to improve it? Of course I could let IDEA fix these warnings but I am not sure this is a good idea.

The most common ones in my case are:


  1.  The final is superfluous:

   /**
     * The layout of this struct
     */
    public static final GroupLayout layout() {
        return $LAYOUT;
    }


  1.  Field may be final

     private static long[] iv$DIMS = { 8 };


  1.  Many classes have unused imports


Best Regards,

Jonathan Rosenne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jextract-dev/attachments/20240515/7d2c73b2/attachment-0001.htm>


More information about the jextract-dev mailing list