Skip to content

major internal rework, sdkman#98

Merged
e-kotov merged 5 commits intomainfrom
new
Jan 13, 2026
Merged

major internal rework, sdkman#98
e-kotov merged 5 commits intomainfrom
new

Conversation

@e-kotov
Copy link
Owner

@e-kotov e-kotov commented Jan 12, 2026

This pull request introduces several enhancements and refactors to the Java environment management package, focusing on supporting multiple Java distributions and download backends (including SDKMAN), improving documentation, optimizing JSON parsing, and expanding the API for listing and clearing Java installations. The changes are grouped below by theme.

Backend and Distribution Support

  • Added support for specifying the download backend (native or sdkman) and distribution (Corretto, Temurin, Zulu) in key functions like java_download, java_ensure, and java_install, with automatic detection of SDKMAN identifiers and related metadata handling. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Improved documentation and parameter inheritance for version, distribution, and backend arguments, including new placeholder documentation functions for global parameters. [1] [2] [3]

API Expansion

  • Added new exported functions for listing and clearing Java distributions and installations: java_clear_distrib, java_clear_installed, java_clear_project, java_list_available, java_list_distrib, java_list_installed, and java_list_project. [1] [2]

Performance and Reliability

  • Switched JSON parsing from jsonlite to RcppSimdJson for faster and more robust configuration file and URL parsing, and added helper functions for reading JSON and lines from URLs. [1] [2]

Refactoring and Robustness

  • Refactored the download logic to centralize metadata resolution and checksum verification, supporting multiple checksum types and handling SDKMAN downloads gracefully.

Documentation and Minor Enhancements

  • Improved function documentation for clarity and maintainability, including examples for SDKMAN usage and backend selection. [1] [2]

These changes collectively improve the flexibility, performance, and usability of the package for managing Java environments across different distributions and installation contexts.

Copilot AI review requested due to automatic review settings January 12, 2026 22:32
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 90.12708% with 101 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.79%. Comparing base (cbc4a78) to head (b3f3ca8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
R/java_resolve.R 63.29% 29 Missing ⚠️
R/java_manage_installed_cache.R 75.00% 12 Missing ⚠️
R/java_manage_project.R 74.46% 12 Missing ⚠️
R/java_list_available.R 95.00% 10 Missing ⚠️
R/java_download.R 87.27% 7 Missing ⚠️
R/java_valid_versions.R 94.61% 7 Missing ⚠️
R/use_java.R 69.56% 7 Missing ⚠️
R/resolve_temurin.R 93.58% 5 Missing ⚠️
R/resolve_corretto.R 95.23% 3 Missing ⚠️
R/resolve_sdkman.R 96.25% 3 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   86.80%   88.79%   +1.98%     
==========================================
  Files          20       27       +7     
  Lines        1993     2819     +826     
==========================================
+ Hits         1730     2503     +773     
- Misses        263      316      +53     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@e-kotov e-kotov merged commit b4a223a into main Jan 13, 2026
11 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.

1 participant