Skip to content

Conversation

@amanthatdoescares
Copy link
Contributor

@amanthatdoescares amanthatdoescares commented Dec 20, 2025

Fixes #471
&
Fixes #470.

The JNI Swift generator emitted await try for async throwing calls,
which produces Swift compiler warnings. This change ensures try await
is emitted correctly.

@ktoso
Copy link
Collaborator

ktoso commented Jan 7, 2026

Appreciate the attempt but if you ran swift test you'd notice this isn't correct and is adding try even to methods which don't need it. Please run tests to verify your fixes are actually complete

@ktoso ktoso changed the title Fixs warning of try await Fix wrong order, or redundant try/await in generated code which caused warnings Jan 7, 2026
@ktoso
Copy link
Collaborator

ktoso commented Jan 7, 2026

I took a stab at fixing this up, thanks for picking up the topic!

Next time please do run the tests locally and follow up to ensure they're passing 🙏

@ktoso ktoso merged commit f241b47 into swiftlang:main Jan 7, 2026
49 checks passed
@amanthatdoescares
Copy link
Contributor Author

@ktoso Thanks for jumping in and fixing it — I appreciate you taking the time.
Apologies for not running the tests locally before pushing; that’s on me.
I’ll make sure tests are run and verified next time so the contribution is solid and mistake-free. Thanks again for the guidance.

@ktoso
Copy link
Collaborator

ktoso commented Jan 7, 2026

No worries, thanks! Looking forward to more contributions :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jextract warnings: jni mode should better handle void result calls to avoid warnings jextract generated code watnings: try must be before await

2 participants