Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Room kotlin gencode #630

Merged
merged 9 commits into from
Jan 15, 2024
Merged

Support Room kotlin gencode #630

merged 9 commits into from
Jan 15, 2024

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented Jan 10, 2024

#skip-changelog

📜 Description

removed try catch from room instrumentation, as TWP (Tracing Without Performance) makes it useless
added new Room classes (generated through ksp) to VisitorTest
In order to use new Room version and ksp, i had to update agp, gradle, kotlin, room, sdk and kotlin compiler versions

💡 Motivation and Context

Fixes #585
Also, removing all try/catch management from Room instrumentation makes it simpler and more robust

💚 How did you test it?

Added classes generated with ksp to VisitorTest

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

updated Room lib, kotlin version and compiler
added new test to the repo
added new Room classes (generated through ksp) to VisitorTest
) {
super.visitMethodInsn(opcode, owner, name, descriptor, isInterface)
// The backend binds the exception to the current span, via tracing without performance, so we don't need any special try/catch management.
if (opcode == Opcodes.INVOKEVIRTUAL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm, does INVOKEVIRTUAL work with the CLOSE method? It used to be INVOKEINTERFACE before

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!
I updated the instrumentation to take the method type into consideration and updated the condition for the close method

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one point to clarify, but otherwise LGTM!

@stefanosiano stefanosiano merged commit 15e9917 into main Jan 15, 2024
17 checks passed
@stefanosiano stefanosiano deleted the fix/room-generate-kotlin branch January 15, 2024 16:39
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.

Sentry Room integration breaks Room Kotlin CodeGen
2 participants