RFR: 7904051: Jextract should generate symbols in the same class consistently
Copying the bug description:
A symbol, depending on the order that clang found it will not necessarily be in the same class every time. The IDE works against you here, when you navigate to a symbol and it exists in header number 4 for example, it will sometimes automatically import header number 4 so you have to go and change it because you want to get it from the top level class. If you don't do that, you build a dependency for your platform into the generated code. The symbols not being consistent across platforms can be fixed by sorting the symbols.
Very simple change, done in a way to not break existing code as a simple sort would've changed the names of variables in the generated code. There was a test case that had to be updated. ------------- Commit messages: - sort symbols and update test case Changes: https://git.openjdk.org/jextract/pull/286/files Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=286&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904051 Stats: 8 lines in 2 files changed: 4 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jextract/pull/286.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/286/head:pull/286 PR: https://git.openjdk.org/jextract/pull/286
On Mon, 30 Jun 2025 16:18:24 GMT, Nizar Benalla <nbenalla@openjdk.org> wrote:
Very simple change, done in a way to not break existing code as a simple sort would've changed the names of variables in the generated code. There was a test case that had to be updated.
This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jextract/pull/286
participants (1)
-
Nizar Benalla