Repository navigation
feat: add Detect hook, so that vfox link --detect java finds existing JDKs - #128
Merged
Merged
Conversation
linghengqian
force-pushed
the
feat/detect-hook
branch
3 times, most recently
from
November 10, 2026 03:54
85e4555 to
ef90a3f
Compare
Fixes #127 (Detect hook for vfox link --detect) and #126 (opt-in links in ~/.jdks), part of version-fox/vfox#737. Detect scans Gradle's jdks folder, IntelliJ IDEA's folder, system directories, SDKMAN/asdf/mise/jabba, Homebrew kegs, Scoop apps, the CI runner tool cache and JAVA_HOME, naming versions like install does. With VFOX_JAVA_JDKS_LINKS=1, each install leaves a version-named link in IDEA's folder and uninstall removes it; non-links are never touched.
linghengqian
force-pushed
the
feat/detect-hook
branch
from
November 10, 2026 05:03
ef90a3f to
d224c52
Compare
Closed
16 of 18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #127, fixes #126, part of version-fox/vfox#737.
Detect: scans Gradle's jdks folder, IntelliJ IDEA's folder, system directories (/usr/lib/jvm, Program Files), version managers (SDKMAN, asdf, mise, jabba), Homebrew kegs (incl. Linuxbrew), Scoop apps, the CI runner tool cache and JAVA_HOME. winget/Chocolatey/vendor installers land in Program Files and are covered by the same roots; nvm manages Node.js only.
Reads each candidate's release file and names the version like install does: runtime version (SEMANTIC_VERSION or leading release+build), GraalVM's own version for that family, then -short name from IMPLEMENTOR and -fx for JavaFX, no suffix for OpenJDK.
Opt-in IDEA links: with VFOX_JAVA_JDKS_LINKS=1 set, each install leaves a link named after the version in IDEA's folder (~/.jdks, ~/Library/Java/JavaVirtualMachines on macOS, %USERPROFILE%.jdks on Windows) so Gradle and IntelliJ IDEA find it; vfox uninstall removes the link it created. Non-links are never touched, failures only warn.
Includes offline tests in the vfox.test style plus real-shell layout tests, and user docs (README, new docs/link.md, troubleshooting pointer, changes.md Unreleased entries). Bumps the Test Plugin workflow to vfox 1.1.0, which brings the Detect hook.