From a.trapletti at ustermetrics.com Wed Oct 1 15:37:24 2025 From: a.trapletti at ustermetrics.com (Adrian Trapletti) Date: Wed, 1 Oct 2025 17:37:24 +0200 Subject: New Jextract Binary for Java 25 Message-ID: Hi, Are there any plans to release a new jextract binary for Java 25? The binaries provided here https://jdk.java.net/jextract/ are quite old. Thx for the feedback Adrian *Dr. Adrian Trapletti* CEO *Uster Metrics GmbH *| Steinstrasse 9b, 8610 Uster, Switzerland P +41 32 512 83 63 | M +41 79 103 71 31 a.trapletti at ustermetrics.com | www.ustermetrics.com This email message including any attachments is confidential and may be privileged. It is intended solely for the use of the individual or entity named on this message. It is provided for informational purposes only and does not constitute an offer or invitation to subscribe for or purchase any services or products. Any form of disclosure, copying, modification or distribution is unauthorized. If you are not the intended recipient, you are requested to please notify the sender immediately and delete the message including any attachments from your computer system network. Email transmission cannot be guaranteed to be secure or error free as information could be modified. We therefore do not accept responsibility or liability as to the completeness or accuracy of the information contained in this message or any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvernee at openjdk.org Thu Oct 2 16:27:12 2025 From: jvernee at openjdk.org (Jorn Vernee) Date: Thu, 2 Oct 2025 16:27:12 GMT Subject: RFR: 7904073: Derive required symbols from client code to minimize generated bindings In-Reply-To: References: Message-ID: <7n_qKzJK_1HLLg9wO95uc_GAqItcMrk2uBv1ejPqYuU=.221933a0-6628-4e10-be6d-947b164c76ff@github.com> On Wed, 3 Sep 2025 15:49:24 GMT, Nizar Benalla wrote: > Please review this change to add a small sample that extracts full bindings once, scans the compiled client classes to collect actually referenced symbols, filters the includes list, and re-runs jextract to produce a slim binding set. This fell off my radar, sorry. samples/opengl-minimal-bidings/Teapot.java line 76: > 74: try (var arena = Arena.ofConfined()) { > 75: var argc = arena.allocateFrom(C_INT, 0); > 76: glutInit(argc, argc); Second argument shouldn't be `argc`, bu a pointer to `argv` (https://www.opengl.org/resources/libraries/glut/spec3/node10.html). I think the other sample also gets this wrong, but I think it works out because we pass `0` as `argc`. samples/opengl-minimal-bidings/run_windows.ps1 line 10: > 8: --enable-native-access=ALL-UNNAMED ` > 9: -D"java.library.path=C:\Windows\System32`;$freeglutPath\bin\x64" ` > 10: Teapot.java I suggest just removing the Windows scripts, as it looks like the filtering script only work on Mac. ------------- Marked as reviewed by jvernee (Reviewer). PR Review: https://git.openjdk.org/jextract/pull/288#pullrequestreview-3295339847 PR Review Comment: https://git.openjdk.org/jextract/pull/288#discussion_r2399327878 PR Review Comment: https://git.openjdk.org/jextract/pull/288#discussion_r2399321989 From nbenalla at openjdk.org Wed Oct 15 11:40:51 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Wed, 15 Oct 2025 11:40:51 GMT Subject: RFR: 7904089: jextract cannot handle "void foo(int foo)" Message-ID: <5AZScqGIAOfygZlyXt3P90g7DLfNlsedz_2g7a6SEu8=.74cf5d14-023d-44ae-8ced-3d24272286c8@github.com> Please review this change to fix a name conflicts between functions and name parameters. TIA! ------------- Commit messages: - handle name conflicts Changes: https://git.openjdk.org/jextract/pull/292/files Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=292&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904089 Stats: 117 lines in 4 files changed: 116 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jextract/pull/292.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/292/head:pull/292 PR: https://git.openjdk.org/jextract/pull/292 From nbenalla at openjdk.org Wed Oct 15 12:37:17 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Wed, 15 Oct 2025 12:37:17 GMT Subject: RFR: 7904073: Derive required symbols from client code to minimize generated bindings [v2] In-Reply-To: References: Message-ID: > Please review this change to add a small sample that extracts full bindings once, scans the compiled client classes to collect actually referenced symbols, filters the includes list, and re-runs jextract to produce a slim binding set. Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision: remove unsued file. Use `*argv` as second argument of glutInit ------------- Changes: - all: https://git.openjdk.org/jextract/pull/288/files - new: https://git.openjdk.org/jextract/pull/288/files/4c4e6dd2..63ca2beb Webrevs: - full: https://webrevs.openjdk.org/?repo=jextract&pr=288&range=01 - incr: https://webrevs.openjdk.org/?repo=jextract&pr=288&range=00-01 Stats: 15 lines in 3 files changed: 2 ins; 10 del; 3 mod Patch: https://git.openjdk.org/jextract/pull/288.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/288/head:pull/288 PR: https://git.openjdk.org/jextract/pull/288 From jvernee at openjdk.org Wed Oct 15 13:33:49 2025 From: jvernee at openjdk.org (Jorn Vernee) Date: Wed, 15 Oct 2025 13:33:49 GMT Subject: RFR: 7904073: Derive required symbols from client code to minimize generated bindings [v2] In-Reply-To: References: Message-ID: <_ZZGCqycFEiPgwAB7H6ml1mQ8actuNBF83d2azv62gA=.b08267a3-65e9-49f8-839e-a4c4d34d6124@github.com> On Wed, 15 Oct 2025 12:37:17 GMT, Nizar Benalla wrote: >> Please review this change to add a small sample that extracts full bindings once, scans the compiled client classes to collect actually referenced symbols, filters the includes list, and re-runs jextract to produce a slim binding set. > > Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision: > > remove unsued file. > Use `*argv` as second argument of glutInit Marked as reviewed by jvernee (Reviewer). ------------- PR Review: https://git.openjdk.org/jextract/pull/288#pullrequestreview-3340432424 From duke at openjdk.org Wed Oct 15 13:52:27 2025 From: duke at openjdk.org (duke) Date: Wed, 15 Oct 2025 13:52:27 GMT Subject: RFR: 7904073: Derive required symbols from client code to minimize generated bindings [v2] In-Reply-To: References: Message-ID: On Wed, 15 Oct 2025 12:37:17 GMT, Nizar Benalla wrote: >> Please review this change to add a small sample that extracts full bindings once, scans the compiled client classes to collect actually referenced symbols, filters the includes list, and re-runs jextract to produce a slim binding set. > > Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision: > > remove unsued file. > Use `*argv` as second argument of glutInit @nizarbenalla Your change (at version 63ca2beba599840f12f6e34dfd02b2490c9fd12d) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jextract/pull/288#issuecomment-3406546942 From mcimadamore at openjdk.org Wed Oct 15 14:13:26 2025 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Wed, 15 Oct 2025 14:13:26 GMT Subject: RFR: 7904089: jextract cannot handle "void foo(int foo)" In-Reply-To: <5AZScqGIAOfygZlyXt3P90g7DLfNlsedz_2g7a6SEu8=.74cf5d14-023d-44ae-8ced-3d24272286c8@github.com> References: <5AZScqGIAOfygZlyXt3P90g7DLfNlsedz_2g7a6SEu8=.74cf5d14-023d-44ae-8ced-3d24272286c8@github.com> Message-ID: On Wed, 15 Oct 2025 11:33:58 GMT, Nizar Benalla wrote: > Please review this change to fix a name conflicts between functions and name parameters. > > TIA! src/main/java/org/openjdk/jextract/impl/HeaderFileBuilder.java line 178: > 176: if (!isVarArg) { > 177: // function name may conflict with any of its parameter names. > 178: boolean nameConflict = parameterNames.contains(javaName); should this use `finalParameterNames` ? Note that `finalParameterNames` might contain additional parameters -- e.g. for the segment allocator. ------------- PR Review Comment: https://git.openjdk.org/jextract/pull/292#discussion_r2432724451 From nbenalla at openjdk.org Wed Oct 15 14:14:29 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Wed, 15 Oct 2025 14:14:29 GMT Subject: Integrated: 7904073: Derive required symbols from client code to minimize generated bindings In-Reply-To: References: Message-ID: On Wed, 3 Sep 2025 15:49:24 GMT, Nizar Benalla wrote: > Please review this change to add a small sample that extracts full bindings once, scans the compiled client classes to collect actually referenced symbols, filters the includes list, and re-runs jextract to produce a slim binding set. This pull request has now been integrated. Changeset: 91ff2392 Author: Nizar Benalla Committer: Maurizio Cimadamore URL: https://git.openjdk.org/jextract/commit/91ff2392ac8c3ee7d0906486e8f523fccdf34c44 Stats: 188 lines in 7 files changed: 184 ins; 0 del; 4 mod 7904073: Derive required symbols from client code to minimize generated bindings Reviewed-by: jvernee ------------- PR: https://git.openjdk.org/jextract/pull/288 From nbenalla at openjdk.org Wed Oct 15 15:53:04 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Wed, 15 Oct 2025 15:53:04 GMT Subject: RFR: 7904089: jextract cannot handle "void foo(int foo)" In-Reply-To: References: <5AZScqGIAOfygZlyXt3P90g7DLfNlsedz_2g7a6SEu8=.74cf5d14-023d-44ae-8ced-3d24272286c8@github.com> Message-ID: On Wed, 15 Oct 2025 14:10:47 GMT, Maurizio Cimadamore wrote: >> Please review this change to fix a name conflicts between functions and name parameters. >> >> TIA! > > src/main/java/org/openjdk/jextract/impl/HeaderFileBuilder.java line 178: > >> 176: if (!isVarArg) { >> 177: // function name may conflict with any of its parameter names. >> 178: boolean nameConflict = parameterNames.contains(javaName); > > should this use `finalParameterNames` ? Note that `finalParameterNames` might contain additional parameters -- e.g. for the segment allocator. I think that most of the time, they are the same. `finalParameterNames` sometimes has the additional `x0`, `x1` parameters but we can check for conflicts with those as well. ------------- PR Review Comment: https://git.openjdk.org/jextract/pull/292#discussion_r2433115766 From nbenalla at openjdk.org Wed Oct 15 17:48:02 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Wed, 15 Oct 2025 17:48:02 GMT Subject: RFR: 7904089: jextract cannot handle "void foo(int foo)" In-Reply-To: References: <5AZScqGIAOfygZlyXt3P90g7DLfNlsedz_2g7a6SEu8=.74cf5d14-023d-44ae-8ced-3d24272286c8@github.com> Message-ID: On Wed, 15 Oct 2025 15:50:46 GMT, Nizar Benalla wrote: >> src/main/java/org/openjdk/jextract/impl/HeaderFileBuilder.java line 178: >> >>> 176: if (!isVarArg) { >>> 177: // function name may conflict with any of its parameter names. >>> 178: boolean nameConflict = parameterNames.contains(javaName); >> >> should this use `finalParameterNames` ? Note that `finalParameterNames` might contain additional parameters -- e.g. for the segment allocator. > > I think that most of the time, they are the same. > `finalParameterNames` sometimes has the additional `x0`, `x1` parameters but we can check for conflicts with those as well. I noticed we can have conflicts for `void foo_variadic(int x1, ...);` too, I will update the PR to handle this ------------- PR Review Comment: https://git.openjdk.org/jextract/pull/292#discussion_r2433465511 From nbenalla at openjdk.org Thu Oct 16 21:42:43 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Thu, 16 Oct 2025 21:42:43 GMT Subject: RFR: 7904073: Derive required symbols from client code to minimize generated bindings [v2] In-Reply-To: References: Message-ID: On Wed, 15 Oct 2025 12:37:17 GMT, Nizar Benalla wrote: >> Please review this change to add a small sample that extracts full bindings once, scans the compiled client classes to collect actually referenced symbols, filters the includes list, and re-runs jextract to produce a slim binding set. > > Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision: > > remove unsued file. > Use `*argv` as second argument of glutInit @keithc-ca I cannot read and respond to your comment, you will need to accept the OpenJDK Terms of Use for your comment to appear. ------------- PR Comment: https://git.openjdk.org/jextract/pull/288#issuecomment-3412957418 From nbenalla at openjdk.org Thu Oct 16 23:40:38 2025 From: nbenalla at openjdk.org (Nizar Benalla) Date: Thu, 16 Oct 2025 23:40:38 GMT Subject: RFR: 7904073: Derive required symbols from client code to minimize generated bindings [v2] In-Reply-To: References: Message-ID: On Wed, 15 Oct 2025 12:37:17 GMT, Nizar Benalla wrote: >> Please review this change to add a small sample that extracts full bindings once, scans the compiled client classes to collect actually referenced symbols, filters the includes list, and re-runs jextract to produce a slim binding set. > > Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision: > > remove unsued file. > Use `*argv` as second argument of glutInit I cannot read your comment because you have not accepted the OpenJDK TOU. ------------- PR Comment: https://git.openjdk.org/jextract/pull/288#issuecomment-3413242649