jextract: Remove $ from generated method parameters#581
Conversation
|
To what extent was this PR prepared by automated tools? I am concerned given the shape of the opening message. |
I used an AI coding assistant to implement this: it searched the repo for swiftArena$, proposed the edits across the generators, docs, tests, and samples, and I reviewed and committed them. I also ran the JExtractSwiftTests locally to confirm everything passes. The PR description was drafted with the assistant; I’m happy to rephrase it if you’d prefer a different style. |
|
Thank you for clarifying. We don't have an official policy yet but yes please, it would be helpful to read messages written by humans summarizing a change. It's a lot of text to read through and didn't make me very confident in the change. It's a pretty small modification and we don't mind assisted PRs but it would be preferable if you explained how it was used or what a PR does using your own voice, thanks in advance. Let's see if this covered all cases, I'm ok merging it if tests pass 👍 |
|
Well, seems it did a good job, happy accepting the change -- please write PR message yourself or summarize what the tool provided, that'll help me review changes. Thank you! |
Thank you, |
Fixes #494
Generated code was using swiftArena$ as the parameter name for the arena. The $ suffix is meant for names inside method bodies (e.g. arena$, ex$) to avoid clashing with real identifiers, not for public parameters. This PR changes the generated parameter to plain swiftArena everywhere.
Updates are in the FFM and JNI generators
in TranslatedDocumentation.swift for Javadoc, and in the tests and sample apps that assert or use this API.
Names like arena$ and ex$ inside method bodies are left as-is.
swift test --filter JExtractSwiftTests passes.