Skip to content

fix pkgdown#94

Merged
e-kotov merged 5 commits intomainfrom
review
Dec 31, 2025
Merged

fix pkgdown#94
e-kotov merged 5 commits intomainfrom
review

Conversation

@e-kotov
Copy link
Copy Markdown
Owner

@e-kotov e-kotov commented Dec 31, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 31, 2025 18:54
@e-kotov e-kotov merged commit 3944d1a into main Dec 31, 2025
12 of 13 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.18%. Comparing base (b69794a) to head (c74af83).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
R/java_env.R 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   85.97%   86.18%   +0.20%     
==========================================
  Files          20       20              
  Lines        1954     1947       -7     
==========================================
- Hits         1680     1678       -2     
+ Misses        274      269       -5     

☔ 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
Copy Markdown
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.

Pull request overview

This PR refactors symlink resolution logic, fixes pkgdown configuration for newer versions, and corrects caching behavior in Java version check functions.

Key changes:

  • Extracts duplicate symlink resolution code into a new resolve_symlinks() utility function with comprehensive test coverage
  • Updates _pkgdown.yml to use current navbar syntax (moving from deprecated navbar: fields in articles to explicit navbar: components: structure)
  • Fixes cache key logic in java_check_version_rjava() and java_check_version_cmd() to use the actual java_home being checked rather than always using Sys.getenv("JAVA_HOME")

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/testthat/test-internal_utilities_symlinks.R Adds comprehensive test suite for the new resolve_symlinks() function covering edge cases like circular symlinks, relative paths, and broken links
_pkgdown.yml Migrates from deprecated pkgdown syntax to current best practices by defining article menu structure in navbar: components: instead of inline navbar: fields
R/java_find.R Refactors duplicate symlink resolution code to use new resolve_symlinks() utility and removes redundant sorting from cached function
R/java_env.R Improves path normalization using normalizePath() instead of manual string replacement, and fixes cache keys to use the effective java_home being checked
R/internal_utilities.R Adds new resolve_symlinks() utility function with proper NA handling and support for relative symlinks, circular references, and configurable max depth

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/java_env.R

# Get check result (either cached or fresh)
cache_key <- Sys.getenv("JAVA_HOME")
# Use the effective java_home as cache key (what we're actually checking)
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The intermediate variable effective_java_home is assigned directly from java_home without any transformation (unlike in java_check_version_cmd where it has conditional logic). While this provides naming consistency between the two functions, you could consider directly using java_home as the cache key parameter to reduce indirection, or add a comment explaining why the intermediate variable exists for consistency with java_check_version_cmd.

Suggested change
# Use the effective java_home as cache key (what we're actually checking)
# Use the effective java_home as cache key (what we're actually checking).
# Note: In this function, effective_java_home is identical to java_home,
# but we keep a separate variable for consistency with java_check_version_cmd,
# where effective_java_home may differ and is used as the cache key.

Copilot uses AI. Check for mistakes.
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.

2 participants