-
Notifications
You must be signed in to change notification settings - Fork 9
Add JDK version distinction behavior of a minimum version & downloadable version #84
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
Conversation
You mean, some "beautify" VSCode extension? I don't use any! I format everything manually as I type. :D BtW, I use extension BasedPyright as my linter on VSCodium. |
Code formatting is cosmetic but it also helps for git diffs. It is confusing when it looks like there are a lot of changes that are actually just formatting changes, and it can cause one to overlook code changes. |
It all looks great. I'll try to test it on Windows soon, but I don't see how this could be any problem. Kind of off topic, but, I have to check how to test and maybe implement my "portable hack" over this that avoids re-downloading the JDK (as it is already there). Maybe in the next plug-in version we can add a portable check and special behavior, as Thonny provides a special file to flag on the portable version. |
This is the new function get_thonny_jdk_install() which searches for a JDK subfolder inside thonny.THONNY_USER_DIR: thonny-py5mode/thonnycontrib/thonny-py5mode/install_jdk.py Lines 74 to 88 in 17a622a
As long as your portable version has its JDK inside THONNY_USER_DIR, new py5mode plugin won't re-download anything. |
@GoToLoop , please let us know when you are done working on this and are ready for review. After this is merged, we can all do some more testing and then prepare for the release. |
You can merge it at any time! That'd also relieve me to focus on other files. |
Just merged it. Thank you for working on this! |
Plugin can now download JDK-21 if no minimum version is found.
But it still accepts versions before JDK-21 but >= JDK-17.
Also, this pull request has comment & code style refactors.
P.S.: Tested on a custom Thonny venv using Python 3.10.8 on Garuda (Arch-based) Linux 6.16.5 + KDE 6.4.4 (Wayland).