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

A sizeable plugin update #24

Merged
merged 8 commits into from
Aug 18, 2024
Merged

Conversation

sschr15
Copy link
Member

@sschr15 sschr15 commented Aug 16, 2024

After a handful of messing around, I've succeeded in some key goals, and I think it's enough to improve the plugin enough

  • Update a bunch of things
    • Gradle 7.6 -> 8.9
    • Java 11 -> 17
    • Kotlin 1.8.0 -> 1.9.22
    • IntelliJ 2023.1 -> 2024.1 (Kotlin plugin reasons)
    • Gradle IntelliJ Plugin 1.13.2 -> IntelliJ Platform Plugin 2.0.1
  • Create a Full decompiler for Kotlin
    • The decompiler is a bit buggy as of now and has unexpected psi issues
  • Update language checking to match that of latest Vineflower versions
  • Presumably fix VineflowerInvoker.decompile holds ReadWrite lock for 65 seconds and freezes UI thread #21
  • Change version to Semver equivalent (remains at 1.1.0)

@Earthcomputer
Copy link
Collaborator

Can you explain what was causing the race condition so I can understand your changes?

@sschr15
Copy link
Member Author

sschr15 commented Aug 16, 2024

I'm not fully confident on what caused the race condition exactly, but my best guess is that the read action to load a classfile was waiting on the main thread, itself waiting on the read action before passing control back to the decompiler. By using the queue system already present for cases in which read access was allowed, it seems to fix the deadlock.

The change to always using the queue was a hopeful guess that seems to work from my testing.

@Earthcomputer Earthcomputer merged commit d17adb9 into Vineflower:main Aug 18, 2024
4 checks passed
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.

VineflowerInvoker.decompile holds ReadWrite lock for 65 seconds and freezes UI thread
2 participants