-
Notifications
You must be signed in to change notification settings - Fork 4
fix macos picking up java stubs from /usr #96
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
…tive_java_home for cache keys; replace repeated symlink resolution with helper in java_find; remove redundant version-sorting
…g for java version check
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 85.97% 86.80% +0.82%
==========================================
Files 20 20
Lines 1954 1993 +39
==========================================
+ Hits 1680 1730 +50
+ Misses 274 263 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where macOS systems were incorrectly picking up Java stub executables from /usr/bin/java instead of actual Java installations. The fix includes enhanced path detection, symlink resolution, AppleDouble file filtering, improved version parsing, and comprehensive test coverage.
Changes:
- Enhanced macOS-specific Java detection to filter out
/usrand properly resolve symlinks - Improved Java version parsing to handle multi-line output and noise like environment variable messages
- Added robust extraction logic to ignore macOS metadata files (AppleDouble
._files)
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-java_version_parsing.R | Comprehensive tests for Java version string parsing across various distributions |
| tests/testthat/test-java_unpack_logic.R | Tests for directory extraction logic with AppleDouble file handling |
| tests/testthat/test-internal_utilities_symlinks.R | Tests for symlink resolution including circular references and relative paths |
| tests/testthat/test-java_full-cycle-live.R | Simplified verification output logic |
| tests/testthat/test-java_find.R | Added mocking for robust path normalization testing |
| tests/testthat/test-java_env_version_impl.R | Added dummy executable creation for path detection tests |
| tests/testthat/test-java_build_env_mocked.R | Wrapped calls with suppressWarnings to handle expected warnings |
| R/java_unpack.R | Enhanced extraction logic with new helper function and macOS fallback handling |
| R/java_find.R | Refactored symlink resolution, added /usr filtering for macOS |
| R/java_env.R | Improved version parsing, fixed cache key handling, added macOS DYLD_LIBRARY_PATH handling |
| R/internal_utilities.R | Added resolve_symlinks utility, ._find_extracted_dir helper, AppleDouble filtering |
| _pkgdown.yml | Reorganized navbar structure for articles |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
No description provided.